aboutsummaryrefslogtreecommitdiffstats
path: root/guts
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-09-08 13:20:13 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-09-08 13:20:13 -0500
commite3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7 (patch)
tree95c8e78d00a738ead9d34efc491438413f1dabed /guts
parent2f00f68c6f14da135bf75251f3ded951023f72ee (diff)
downloadpseudo-e3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7.tar.gz
pseudo-e3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7.tar.bz2
pseudo-e3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7.zip
Fix mkfifoat() to not always fail
mknodat() uses a dev_t * argument, not a dev_t argument, so the 0 passed into wrap___xmknodat() by wrap_mkfifoat() is an invalid argument rather than an unused but valid zero. Change mkfifoat to create a dummy dev_t and pass its address.
Diffstat (limited to 'guts')
-rw-r--r--guts/mkfifoat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/guts/mkfifoat.c b/guts/mkfifoat.c
index b1053f1..26fcba3 100644
--- a/guts/mkfifoat.c
+++ b/guts/mkfifoat.c
@@ -6,8 +6,9 @@
* wrap_mkfifoat(int dirfd, const char *path, mode_t mode) {
* int rc = -1;
*/
+ dev_t unused = 0;
- rc = wrap___xmknodat(_STAT_VER, dirfd, path, (mode & 07777) | S_IFIFO, 0);
+ rc = wrap___xmknodat(_STAT_VER, dirfd, path, (mode & 07777) | S_IFIFO, &unused);
/* return rc;
* }