aboutsummaryrefslogtreecommitdiffstats
path: root/ports/linux
diff options
context:
space:
mode:
Diffstat (limited to 'ports/linux')
-rw-r--r--ports/linux/guts/__xmknodat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/linux/guts/__xmknodat.c b/ports/linux/guts/__xmknodat.c
index 296918a..4fa021b 100644
--- a/ports/linux/guts/__xmknodat.c
+++ b/ports/linux/guts/__xmknodat.c
@@ -11,6 +11,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, "xmknodat creating '%s', mode 0%o\n",
+ path ? path : "<no name>", (int) mode);
/* we don't use underlying call, so _ver is irrelevant to us */
(void) ver;