diff options
Diffstat (limited to 'debian/patches/shutdown0003-xxx-halt-hack.patch')
-rw-r--r-- | debian/patches/shutdown0003-xxx-halt-hack.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches/shutdown0003-xxx-halt-hack.patch b/debian/patches/shutdown0003-xxx-halt-hack.patch new file mode 100644 index 00000000..3f6820af --- /dev/null +++ b/debian/patches/shutdown0003-xxx-halt-hack.patch @@ -0,0 +1,45 @@ +From c5f12b3940116917929fefc41a948297371c09c4 Mon Sep 17 00:00:00 2001 +From: Justus Winter <justus@gnupg.org> +Date: Fri, 22 Apr 2016 02:53:44 +0200 +Subject: [PATCH hurd 3/3] xxx halt hack + +--- + sutils/halt.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/sutils/halt.c b/sutils/halt.c +index 08f754c..4d36ca2 100644 +--- a/sutils/halt.c ++++ b/sutils/halt.c +@@ -25,6 +25,8 @@ + #include <argp.h> + #include <error.h> + #include <hurd.h> ++#include <hurd/paths.h> ++#include <hurd/startup.h> + #include <version.h> + + const char *argp_program_version = STANDARD_HURD_VERSION (halt); +@@ -32,9 +34,17 @@ const char *argp_program_version = STANDARD_HURD_VERSION (halt); + int + main (int argc, char *argv[]) + { ++ error_t err; ++ file_t server; + struct argp argp = {0, 0, 0, "Halt the system"}; + argp_parse (&argp, argc, argv, 0, 0, 0); +- reboot (RB_HALT); +- error (1, errno, "reboot"); ++ ++ server = file_name_lookup (_SERVERS_STARTUP, 0, 0); ++ if (! MACH_PORT_VALID (server)) ++ error (1, errno, _HURD_STARTUP); ++ ++ err = startup_reboot (server, MACH_PORT_NULL, RB_HALT); ++ if (err) ++ error (1, err, "reboot"); + return 1; + } +-- +2.1.4 + |