bug-hurd
[Top][All Lists]
Advanced

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

[PATCH hurd] Use default pager MiG stubs from Hurd instead of gnumach


From: Flavio Cruz
Subject: [PATCH hurd] Use default pager MiG stubs from Hurd instead of gnumach
Date: Thu, 6 Apr 2023 01:20:40 -0400

Hurd code relies on gnumach default_pager.defs headers when making calls
using the default pager RPC. Those stubs were checked in back in the 90s
and are essentially unused because gnumach does not implement or use
that interface. Instead use the Hurd interface directly.

This is safe since the Hurd stubs are a super set of the gnumach stubs.

Later, we won't need to install the gnumach stubs anymore through glibc.
---
 boot/boot.c                  | 2 +-
 libdiskfs/io-map-cntl.c      | 2 +-
 libshouldbeinlibc/portinfo.c | 2 +-
 procfs/rootdir.c             | 1 -
 utils/vminfo.c               | 3 ++-
 utils/vmstat.c               | 3 ++-
 6 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/boot/boot.c b/boot/boot.c
index 147bb2b0..93dd9386 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -33,7 +33,6 @@
 #include <pthread.h>
 #include <fcntl.h>
 #include <mach/mig_support.h>
-#include <mach/default_pager.h>
 #include <argp.h>
 #include <hurd/store.h>
 #include <hurd/ihash.h>
@@ -41,6 +40,7 @@
 #include <sys/mman.h>
 #include <version.h>
 
+#include "default_pager_U.h"
 #include "notify_S.h"
 #include "device_S.h"
 #include "io_S.h"
diff --git a/libdiskfs/io-map-cntl.c b/libdiskfs/io-map-cntl.c
index 4a9b1f61..6432fa0a 100644
--- a/libdiskfs/io-map-cntl.c
+++ b/libdiskfs/io-map-cntl.c
@@ -15,9 +15,9 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
+#include "default_pager_U.h"
 #include "priv.h"
 #include "io_S.h"
-#include <mach/default_pager.h>
 
 /* Implement io_map_cntl as described in <hurd/io.defs>. */
 kern_return_t
diff --git a/libshouldbeinlibc/portinfo.c b/libshouldbeinlibc/portinfo.c
index 75a20bb9..f2564a3a 100644
--- a/libshouldbeinlibc/portinfo.c
+++ b/libshouldbeinlibc/portinfo.c
@@ -22,7 +22,6 @@
 #include <arpa/inet.h>
 #include <sys/un.h>
 
-#include <mach/default_pager.h>
 #include <hurd/fsys.h>
 #include <hurd/msg.h>
 #include <hurd/pci.h>
@@ -32,6 +31,7 @@
 #include <hurd/tioctl.h>
 #include <hurd.h>
 
+#include "default_pager_U.h"
 #include "portinfo.h"
 
 /* Prints info about NAME in TASK to STREAM, in a way described by the flags
diff --git a/procfs/rootdir.c b/procfs/rootdir.c
index d6992911..45e228c8 100644
--- a/procfs/rootdir.c
+++ b/procfs/rootdir.c
@@ -22,7 +22,6 @@
 #include <mach/vm_statistics.h>
 #include <mach/vm_cache_statistics.h>
 #include "default_pager_U.h"
-#include <mach/default_pager.h>
 #include <mach_debug/mach_debug_types.h>
 #include <hurd/paths.h>
 #include <arpa/inet.h>
diff --git a/utils/vminfo.c b/utils/vminfo.c
index 2718591d..fcd6ca27 100644
--- a/utils/vminfo.c
+++ b/utils/vminfo.c
@@ -28,9 +28,10 @@
 
 #include <mach.h>
 #include <mach/vm_statistics.h>
-#include <mach/default_pager.h>
 #include <hurd.h>
 
+#include "default_pager_U.h"
+
 const char *argp_program_version = STANDARD_HURD_VERSION (vminfo);
 
 static const struct argp_option options[] = {
diff --git a/utils/vmstat.c b/utils/vmstat.c
index 684a5917..ff2e7be2 100644
--- a/utils/vmstat.c
+++ b/utils/vmstat.c
@@ -31,10 +31,11 @@
 #include <mach/gnumach.h>
 #include <mach/vm_statistics.h>
 #include <mach/vm_cache_statistics.h>
-#include <mach/default_pager.h>
 #include <hurd.h>
 #include <hurd/paths.h>
 
+#include "default_pager_U.h"
+
 const char *argp_program_version = STANDARD_HURD_VERSION (vmstat);
 
 static const struct argp_option options[] = {
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]