git: mknod(2): Allow for the creation of fifos with mknod() to satisfy POSIX.

Sascha Wildner swildner at crater.dragonflybsd.org
Wed Jul 7 07:55:11 PDT 2021


commit fe44073222e684e0eb185a0745e826d67e50e275
Author: Sascha Wildner <saw at online.de>
Date:   Wed Jul 7 16:49:16 2021 +0200

    mknod(2): Allow for the creation of fifos with mknod() to satisfy POSIX.
    
    Calling mknod() and mknodat() with S_IFIFO shall be equivalent to
    calling mkfifo() and mkfifoat().
    
    Note that we ignore 'dev' if S_IFIFO is passed, like Linux does, but
    different from what {Free,Net,Open}BSD do, which require it to be 0.
    It's true that the standard leaves anything but 0 undefined for this
    case but also note the standard's example which does indeed pass a
    'dev' arg and doesn't take any precautions of initializing it:
    
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknod.html#tag_16_328_06
    
    I don't think it makes any difference in practice, though.
    
    Reported-by: DanDan
    
    While here, fix the manual page's HISTORY a bit (taken from FreeBSD).

Summary of changes:
 lib/libc/sys/mknod.2    | 20 +++++++++++++++++---
 sys/kern/vfs_syscalls.c |  3 +++
 2 files changed, 20 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fe44073222e684e0eb185a0745e826d67e50e275


-- 
DragonFly BSD source repository


More information about the Commits mailing list