Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumphijack support mknod. from riz



details:   https://anonhg.NetBSD.org/src/rev/17bf11e896ed
branches:  trunk
changeset: 762687:17bf11e896ed
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Feb 25 18:29:00 2011 +0000

description:
support mknod.  from riz

diffstat:

 lib/librumphijack/hijack.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (71 lines):

diff -r cf42830252d4 -r 17bf11e896ed lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Fri Feb 25 18:11:53 2011 +0000
+++ b/lib/librumphijack/hijack.c        Fri Feb 25 18:29:00 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.67 2011/02/24 12:25:44 pooka Exp $       */
+/*      $NetBSD: hijack.c,v 1.68 2011/02/25 18:29:00 pooka Exp $       */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.67 2011/02/24 12:25:44 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.68 2011/02/25 18:29:00 pooka Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -93,6 +93,7 @@
        DUALCALL___GETCWD,
        DUALCALL_CHFLAGS, DUALCALL_LCHFLAGS, DUALCALL_FCHFLAGS,
        DUALCALL_ACCESS,
+       DUALCALL_MKNOD,
        DUALCALL__NUM
 };
 
@@ -113,6 +114,7 @@
 #define REALUTIMES utimes
 #define REALLUTIMES lutimes
 #define REALFUTIMES futimes
+#define REALMKNOD mknod
 #else
 #define REALSELECT _sys___select50
 #define REALPOLLTS _sys___pollts50
@@ -122,7 +124,7 @@
 #define REALFSTAT __fstat50
 #define REALUTIMES __utimes50
 #define REALLUTIMES __lutimes50
-#define REALFUTIMES __futimes50
+#define REALMKNOD __mknod50
 #endif
 #define REALREAD _sys_read
 #define REALPREAD _sys_pread
@@ -147,6 +149,7 @@
 int REALFUTIMES(int, const struct timeval [2]);
 int REALMOUNT(const char *, const char *, int, void *, size_t);
 int __getcwd(char *, size_t);
+int REALMKNOD(const char *, mode_t, dev_t);
 
 #define S(a) __STRING(a)
 struct sysnames {
@@ -218,6 +221,7 @@
        { DUALCALL_LCHFLAGS,    "lchflags",     RSYS_NAME(LCHFLAGS)     },
        { DUALCALL_FCHFLAGS,    "fchflags",     RSYS_NAME(FCHFLAGS)     },
        { DUALCALL_ACCESS,      "access",       RSYS_NAME(ACCESS)       },
+       { DUALCALL_MKNOD,       S(REALMKNOD),   RSYS_NAME(MKNOD)        },
 };
 #undef S
 
@@ -1808,6 +1812,11 @@
        (const char *, int),                                            \
        (path, mode))
 
+PATHCALL(int, REALMKNOD, DUALCALL_MKNOD,                               \
+       (const char *path, mode_t mode, dev_t dev),                     \
+       (const char *, mode_t, dev_t),                                  \
+       (path, mode, dev))
+
 /*
  * Note: with mount the decisive parameter is the mount
  * destination directory.  This is because we don't really know



Home | Main Index | Thread Index | Old Index