aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix/guts')
-rw-r--r--ports/unix/guts/mknodat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/unix/guts/mknodat.c b/ports/unix/guts/mknodat.c
index 76e4dd9..afeab46 100644
--- a/ports/unix/guts/mknodat.c
+++ b/ports/unix/guts/mknodat.c
@@ -12,6 +12,12 @@
/* mask out mode bits appropriately */
mode = mode & ~pseudo_umask;
+ /* if you don't specify a type, assume regular file */
+ if (!(mode & S_IFMT)) {
+ mode |= S_IFREG;
+ }
+ pseudo_debug(PDBGF_FILE, "mknodat creating '%s', mode 0%o\n",
+ path ? path : "<no name>", (int) mode);
#ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
if (dirfd != AT_FDCWD) {