aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog.txt3
-rw-r--r--guts/mkfifoat.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index cba674d..777bcf9 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2010-09-08:
+ * (seebs) handle mkfifo without guaranteeing an EINVAL response.
+
2010-09-02:
* (seebs) fix errno for getcwd() with insufficient size
* (seebs) Add an RPATH entry to the pseudo binary to find the sqlite3
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;
* }