Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(),
inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(),
and set_sysclock_timezone().
/etc/adjtime is short enough we don't need to bother with a break.
The final "else" case in main() should always trigger because >0 in optstr
says "at most zero arguments", so the || at the end is always true, so
take the test off.
|
|
|
|
|
|
to utimensat() which offers nanosecond granularity and UTIME_OMIT/UTIME_NOW.
|
|
style alias address assignments. No idea why.
|
|
|
|
Include full template in error messages.
Don't report success on failure with -q.
Avoid unnecessary allocation.
Fix "xxxxxx" versus "XXXXXX" confusion.
|
|
|
|
don't need a separate xexec_optargs().
|
|
Needs more testing, don't have a test environment set up for this yet...
|
|
(If you had a chmod 000 directory and did rm -r on it without -f, after the prompt it would complain it was a directory.)
|
|
faccessat(AT_SYMLINK_NOFOLLOW) is not supported.
|
|
the list.
|
|
|
|
|
|
The problem was that readline() was returning a newline at the end of each
string, which wasn't getting stripped in the parser and thus \ wasn't at the
end of a line for -f, it was escaping a literal newline, so the continuation
logic didn't trigger. Remove some redundant null checks while we're at it,
and don't bother terminating a string we don't return (yes we leak memory
in an error path, but it's about to error_exit() anyway).
|
|
For systems using /dev/rtcN, /dev/rtc0 isn't necessarily the RTC
that's used to provide the system time at boot time. We need to search
for the RTC whose /sys/class/rtc/rtcN/hctosys contains "1".
|
|
|
|
a static inline in portability.h, and prototype dirname() while we're at it.
|
|
|
|
|
|
the SELinux commands (such as chcon) and the SELinux-specific options
to regular commands (such as ls -Z).
This lets us #include <selinux/selinux.h> in portability.h.
I've also fixed chcon to insist on being given the a context argument.
This patch also adds -Z to id and fixes id's regular output (-G should
be separated by spaces, non-G output should be separated by commas,
and you don't want a double comma where the egid is omitted from the
list of groups).
|
|
instead of stopping after -l or -L.
Hyejin Kim tried "toyboxd nc nc -p 1234 -l rm mv ps" (which attempted to run
"nc rm mv ps") and "toybox nc -l -p 1234" (which attempted to run "-p 1234")
and found the behavior confusing. So make it work like xargs, where all
netcat options have to come before the start of any child command.
|
|
but it's a start.)
|
|
toolbox (NetBSD) chown...
new test:
and here's the patch to fix "owner:" ":group" and the ":" special case:
|
|
|
|
resume position, so the script would restart from beginning.
|
|
without a \ escaping the newline.
|
|
|
|
|
|
Alas, passing a union as the last argument to printf does not appear to work
reliably, and there's no obvious way to manually assemble varargs in a portable
manner. So I have to repeat the printf once for each data type. Oh well.
|
|
|
|
Fixes bug introduced last time where toys.optargs was both snapshotted and used
directly and the two fell out of sync.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curly brackets.)
He says:
In the channel selection loop, "if (TT.chan)" had been combined with
a strcmp; the else conditionals were premised on if (TT.chan) alone.
The help text had been only partially updated for a couple option changes.
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
the end and option parsing fell off the end looking for it (segfault) if DEBUG wasn't enabled to check for that.
|
|
random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
|
|
|
|
|
|
|