Source-Changes-HG archive

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

[src/trunk]: src/lib/librumphijack teach hijack about the new vfs syscalls



details:   https://anonhg.NetBSD.org/src/rev/a62b18cd1bbe
branches:  trunk
changeset: 459781:a62b18cd1bbe
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Sep 25 20:19:59 2019 +0000

description:
teach hijack about the new vfs syscalls

diffstat:

 lib/librumphijack/hijack.c |  29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diffs (87 lines):

diff -r d8b54945daf5 -r a62b18cd1bbe lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Wed Sep 25 20:17:59 2019 +0000
+++ b/lib/librumphijack/hijack.c        Wed Sep 25 20:19:59 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.127 2019/02/17 23:35:50 bad Exp $        */
+/*      $NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $   */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include <rump/rumpuser_port.h>
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.127 2019/02/17 23:35:50 bad Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.128 2019/09/25 20:19:59 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -216,7 +216,17 @@
 #define REALMOUNT __mount50
 #define REALGETFH __getfh30
 #define REALFHOPEN __fhopen40
+#if !__NetBSD_Prereq__(9,99,13)
+#define REALSTATVFS1 statvfs1
+#define REALFSTATVFS1 fstatvfs1
+#define REALGETVFSSTAT getvfsstat
 #define REALFHSTATVFS1 __fhstatvfs140
+#else
+#define REALSTATVFS1 __statvfs190
+#define REALFSTATVFS1 __fstatvfs190
+#define REALGETVFSSTAT __getvfsstat90
+#define REALFHSTATVFS1 __fhstatvfs190
+#endif
 #define REALSOCKET __socket30
 
 #define LSEEK_ALIAS _lseek
@@ -264,7 +274,10 @@
 int REALGETFH(const char *, void *, size_t *);
 int REALFHOPEN(const void *, size_t, int);
 int REALFHSTAT(const void *, size_t, struct stat *);
+int REALSTATVFS1(const char *, struct statvfs *, int);
+int REALFSTATVFS1(int, struct statvfs *, int);
 int REALFHSTATVFS1(const void *, size_t, struct statvfs *, int);
+int REALGETVFSSTAT(struct statvfs *, size_t, int);
 int REALSOCKET(int, int, int);
 
 #define S(a) __STRING(a)
@@ -365,9 +378,9 @@
 #endif
 
 #ifdef __NetBSD__
-       { DUALCALL_STATVFS1,    "statvfs1",     RSYS_NAME(STATVFS1)     },
-       { DUALCALL_FSTATVFS1,   "fstatvfs1",    RSYS_NAME(FSTATVFS1)    },
-       { DUALCALL_GETVFSSTAT,  "getvfsstat",   RSYS_NAME(GETVFSSTAT)   },
+       { DUALCALL_STATVFS1,    S(REALSTATVFS1),RSYS_NAME(STATVFS1)     },
+       { DUALCALL_FSTATVFS1,   S(REALFSTATVFS1),RSYS_NAME(FSTATVFS1)   },
+       { DUALCALL_GETVFSSTAT,  S(REALGETVFSSTAT),RSYS_NAME(GETVFSSTAT) },
 #endif
 
 #ifdef __NetBSD__
@@ -2497,7 +2510,7 @@
 #endif
 
 #ifdef __NetBSD__
-FDCALL(int, fstatvfs1, DUALCALL_FSTATVFS1,                             \
+FDCALL(int, REALFSTATVFS1, DUALCALL_FSTATVFS1,                         \
        (int fd, struct statvfs *buf, int flags),                       \
        (int, struct statvfs *, int),                                   \
        (fd, buf, flags))
@@ -2599,7 +2612,7 @@
        (path, mode))
 
 #ifdef __NetBSD__
-PATHCALL(int, statvfs1, DUALCALL_STATVFS1,                             \
+PATHCALL(int, REALSTATVFS1, DUALCALL_STATVFS1,                         \
        (const char *path, struct statvfs *buf, int flags),             \
        (const char *, struct statvfs *, int),                          \
        (path, buf, flags))
@@ -2728,7 +2741,7 @@
  */
 
 #ifdef __NetBSD__
-VFSCALL(VFSBIT_GETVFSSTAT, int, getvfsstat, DUALCALL_GETVFSSTAT,       \
+VFSCALL(VFSBIT_GETVFSSTAT, int, REALGETVFSSTAT, DUALCALL_GETVFSSTAT,   \
        (struct statvfs *buf, size_t buflen, int flags),                \
        (struct statvfs *, size_t, int),                                \
        (buf, buflen, flags))



Home | Main Index | Thread Index | Old Index