Commit Graph

8 Commits

Author SHA1 Message Date
Michael Forney 4542db4e40 mknod: Add support for making FIFOs 2020-03-01 16:33:18 -08:00
Michael Forney ba2f04f391 mknod: Use a switch statement for the node type 2020-03-01 16:33:18 -08:00
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
sin 5b5f062184 Add license file details at top of files 2013-10-07 17:03:34 +01:00
sin b5a511dacf Exit with EXIT_SUCCESS/EXIT_FAILURE instead of 0 and 1
Fixed for consistency purposes.
2013-10-07 16:44:22 +01:00
David Galos 3c5f2b2407 Simplyfing mknod. Good eye, Truls Becken. 2013-07-03 11:48:06 -04:00
David Galos 1fbe4e95ed Adding mknod(1) 2013-07-03 02:02:36 -04:00