Commit Graph

4 Commits

Author SHA1 Message Date
Michael Forney
e5d8efb32f Import mknod from ubase
Although mknod is not a POSIX tool, it is widely available on nearly
all UNIX-like systems. It also can be implemented portably apart
from use of the makedev macros, which is already a requirement of
a couple other tools in sbase.

While we're at it, fix a few bugs:
- Include sys/sysmacros.h if makedev was not defined by sys/types.h
- The default mode should respect the user's umask, rather than
  assuming it is 022.
- Clear the umask when -m is specified explicitly so that nodes can
  be created with permissions wider than the user's umask.
- Utilize parsemode from libutil to support symbolic mode strings.
2020-03-01 16:33:11 -08:00
sin
43057f3a39 Remove mknod(1) from sbase
mknod(1) is not POSIX and it is not portable so it should be
in ubase instead of sbase.
2014-01-28 16:53:53 +00:00
David Galos
9f8deb4b23 Tar compiles on BSD, thanks Roberto E. Vargas Caballero. Also remove tons of trailing whitespace. 2013-07-20 01:27:42 -04:00
David Galos
1fbe4e95ed Adding mknod(1) 2013-07-03 02:02:36 -04:00