aboutsummaryrefslogtreecommitdiff
path: root/toys/other/makedevs.c
AgeCommit message (Collapse)Author
2019-08-15Fix two typos.Elliott Hughes
2019-08-15Switch makedevs to new GLOBALS naming.Rob Landley
2019-03-13Use defined constants for mkpathat.Hadrian Węgrzynowski
2018-12-04Clean up some --help formatting.Elliott Hughes
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
2016-08-18Change xgetpwnamid/xgetgrnamid to xgetuid/xgetgid returning the id numberRob Landley
instead of a struct. This means it can return "12345" even if that user/group doesn't exist in /etc/passwd and similar. All the users were immediately dereferencing it to get pw_uid or gr_gid anyway, so just return it directly and adjust the users. This fixes things like "chown 12345:23456 filename".
2016-08-04Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout,Rob Landley
add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users.
2016-03-02For years the man pages have said to #include <sys/types.h> to getRob Landley
major/minor/makedev, but glibc has vowed to break existing programs (https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html) and replace it with _another_ non-standard header (not in posix or lsb), so let's just add functions to lib/ that do the transform ourselves.
2015-04-21Bugfix from Hyejin Kim (count=1 shouldn't change name), plus a bounds check.Rob Landley
Test is 'echo "AAA c 1 0 0 2 5 0 0 1" | makedevs' makes AAA not AAA0.
2015-03-12Make find accept numeric uid/gid, and simplify makedevs using the new ↵Rob Landley
infrastructure.
2014-06-30Promote makedevs to other.Rob Landley