Age | Commit message (Collapse) | Author |
|
Right-aligned looks pretty good to me, but it's not what anyone else does.
|
|
|
|
We need to remove the destination, not the source, to be able to overwrite.
|
|
|
|
add NOSTRIP variable to force skipping strip, and save intermediate flag
data in generated/flags.raw and have mkflags.c error message point to that.
|
|
|
|
Now that the kernel's 128k environment size has been lifted, it might be
possible to feed in a gigabyte of suffix so argv[2] is enough larger than
argv[1] that char *s decrements past NULL and points to arbitrary high
memory (I.E. strlen(suffix) > (long)base), at which point the base > s
test is defeated and we strcmp() against a wild pointer.
Which is read only anyway and on 64 bit you probably couldn't hit any
interesting addresses, but the fix is easy enough: compare strlen values
instead of pointers. So do that instead.
|
|
it's how the kernel signals that ctrl-alt-delete has been pressed;
thus, setting it as the signal for reboot prevents ctrlaltdel scripts
from working.
SIGTERM is what Busybox uses, so we might as well be compatible.
|
|
|
|
|
|
The three separate lists had got a bit out of sync. The genuinely new
changes are in the top list.
|
|
|
|
Correctly and portably check for non-normal dates, and explicitly show
the "before" and "after" dates (in the format of the user's choosing).
Clear the struct tm in date_main rather than parse_default because on
one path the struct tm is actually initialized. Explicitly clear the
tm_sec field in parse_default because -- experiment shows -- that
should not be preserved. Only do the "what does this 2-digit year
mean?" dance if we actually parsed a 2-digit year. Show the right
string in the error message if strptime fails.
Also add more tests, and use UTC in the tests to avoid flakiness.
|
|
uninitialized trash in struct tm fields could segfault glibc's strftime().
|
|
looks like. dd uses "7 MB" where du uses "7M", for example. this patch
adds flags, similar to the BSD humanize_number. most callers will pass 0.
|
|
|
|
It's user then group, not the other way round.
|
|
mkbootimg was rewritten as a python script a while ago, and I just
deleted gpttool. (gptfdisk is in external/, but I'm assuming the
existing entry for fdisk is meant to cover that.)
|
|
|
|
|
|
|
|
|
|
|
|
Given modprobe -a, it's important to not exit early for a failure to
load a module; additionally, the rest of the code presumes that this
can fail without exiting.
|
|
Add the MS_MOVE of cwd to / and chroot into it. chdir is also
called to ensure cwd does not point outside the chroot.
The switch_root toy was also blocking any case where NEW_ROOT/init
did not exist, even though NEW_INIT was a required parameter and
did not have to be '/init'. Change it to handle any NEW_INIT
passed as either a relative or absolute path.
With this change, the switch_root toy actually works from initramfs.
|
|
not stomping on gnu's "an extra argument tells it to set the time so let's
add -s to do the same thing" extension).
Nanoseconds aren't uniformly supported by these apis, so had to stick it in
GLOBALS() and pull it out later. Awkward, open to suggestions for a better way.
(Also, the setting API is microseconds, not nanoseconds. Collect nano, convert
to micro so we can switch APIs later without changing date's external UI again.)
Oh, and shrink really_long_name_mktime() with a for() loop (and rename it)
although I may go back and redo that for portability to hypothetical libraries
if I can convert this mess to struct timespec with proper nanoseconds support.
But that needs an extended strptime() which needs an extended struct tm,
and between us and that is convincing posix computers got fast enough to
care about fractions of a second.
(Yes, I'm aware gnu added %N to date without adding it to strptime, implying
they reimplemented strptime longhand inside date. I'm not doing that.)
|
|
Humans get upset when date(1) lets mktime(3) work out what the 99th day
of the 99th month would be rather than rejecting the invalid date. For
the subtly wrong cases, rather than get into the leap year business,
let's rely on localtime_r(3).
|
|
|
|
|
|
|
|
Somebody (carsonh on freenode) objected that they were running something
like "toybox test 1 == 2" and couldn't distinguish the test failing from
toybox not having the test command. Why they were running toybox out of
the multiplexer instead of having a test symlink in the $PATH, I couldn't
tell you. (Is "I know toybox is on this system, but don't know how it was
configured" a problem people actually have?)
*shrug* They care about it more than I do, so now you can't distinguish between
the multiplexer not being found and the command the multiplexer tried to
run not being found. Progress!
|
|
scans /proc/partitions).
|
|
|
|
init: use SIGINT, use xsignal()
Now that oneit supports the same signals as our "sysv"-init for shutdown,
make reboot et al. signal pid 1 with the appropriate signal.
Of these signals, only SIGINT works with sysvinit 2.88, causing a reboot.
The others are only supported in Busybox init.
Also, make init accept SIGINT and use xsignal().
|
|
|
|
before failing.
|
|
Still need a rethink on how to handle socket/bind/connect sequence.
|
|
|
|
|
|
Only tested that it compiled so far.
|
|
|
|
|
|
reverse that to get correct paths.
While we're here, reduce the duplication of initialization.
While this is enough for some drivers, it won't get 'input/' stuff
in the right folder.
|
|
|
|
|
|
|
|
|
|
tftp - Client for tftp daemon.
hostid -Print the numeric identifier for the current host.
fsync -Synchronize a file's in-core state with storage device.
|
|
|
|
|