summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-11-06 12:13:30 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-11-06 12:13:30 +0100
commit2de7e7dc186f80b7a6c42f4e96ad11b4d3c17cd7 (patch)
tree4e41d58274ce4a36eb5a4ad1d57716d09fe33ff2 /debian
parent8e475c45967b99c4217197edaa4a49aac6fca59d (diff)
add patch series
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/fixes0001-Remove-unused-variables.patch69
-rw-r--r--debian/patches/fixes0002-random-fix-odd-formatting.patch46
-rw-r--r--debian/patches/fixes0003-random-improve-error-handling.patch73
-rw-r--r--debian/patches/fixes0004-random-use-servers-startup-to-register-for-shutdown-.patch53
-rw-r--r--debian/patches/series4
5 files changed, 245 insertions, 0 deletions
diff --git a/debian/patches/fixes0001-Remove-unused-variables.patch b/debian/patches/fixes0001-Remove-unused-variables.patch
new file mode 100644
index 00000000..f410e07a
--- /dev/null
+++ b/debian/patches/fixes0001-Remove-unused-variables.patch
@@ -0,0 +1,69 @@
+From a9eb3e9765a21f9903705e2b9f46694529af8155 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 6 Nov 2015 10:39:53 +0100
+Subject: [PATCH hurd 1/4] Remove unused variables
+
+* console/pager.c (user_pager_init): Remove unused variables.
+* ext2fs/pager.c (create_disk_pager): Likewise.
+* fatfs/pager.c (create_fat_pager): Likewise.
+* storeio/pager.c (init_dev_paging): Likewise.
+---
+ console/pager.c | 1 -
+ ext2fs/pager.c | 2 --
+ fatfs/pager.c | 2 --
+ storeio/pager.c | 1 -
+ 4 files changed, 6 deletions(-)
+
+diff --git a/console/pager.c b/console/pager.c
+index 818e49d..05074a7 100644
+--- a/console/pager.c
++++ b/console/pager.c
+@@ -125,7 +125,6 @@ pager_dropweak (struct user_pager_info *upi)
+ void
+ user_pager_init (void)
+ {
+- pthread_t thread;
+ error_t err;
+
+ /* Create the pager bucket, and start to serve paging requests. */
+diff --git a/ext2fs/pager.c b/ext2fs/pager.c
+index 3e080f8..9df7e0b 100644
+--- a/ext2fs/pager.c
++++ b/ext2fs/pager.c
+@@ -1200,8 +1200,6 @@ disk_cache_block_is_ref (block_t block)
+ void
+ create_disk_pager (void)
+ {
+- pthread_t thread;
+- pthread_attr_t attr;
+ error_t err;
+
+ /* The disk pager. */
+diff --git a/fatfs/pager.c b/fatfs/pager.c
+index d255f29..84376bd 100644
+--- a/fatfs/pager.c
++++ b/fatfs/pager.c
+@@ -764,8 +764,6 @@ pager_dropweak (struct user_pager_info *p __attribute__ ((unused)))
+ void
+ create_fat_pager (void)
+ {
+- pthread_t thread;
+- pthread_attr_t attr;
+ error_t err;
+
+ /* The disk pager. */
+diff --git a/storeio/pager.c b/storeio/pager.c
+index f8f59cd..54b1714 100644
+--- a/storeio/pager.c
++++ b/storeio/pager.c
+@@ -155,7 +155,6 @@ init_dev_paging ()
+ pthread_mutex_lock (&pager_global_lock);
+ if (pager_port_bucket == NULL)
+ {
+- pthread_t thread;
+ error_t err;
+
+ pager_port_bucket = ports_create_bucket ();
+--
+2.1.4
+
diff --git a/debian/patches/fixes0002-random-fix-odd-formatting.patch b/debian/patches/fixes0002-random-fix-odd-formatting.patch
new file mode 100644
index 00000000..eeed2a1a
--- /dev/null
+++ b/debian/patches/fixes0002-random-fix-odd-formatting.patch
@@ -0,0 +1,46 @@
+From 608ea90065a50b7f8e3a5592c8e8e4cbd0265490 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 6 Nov 2015 11:48:39 +0100
+Subject: [PATCH hurd 2/4] random: fix odd formatting
+
+* random/random.c (trivfs_append_args): Fix odd formatting.
+---
+ random/random.c | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/random/random.c b/random/random.c
+index 15be383..9ade161 100644
+--- a/random/random.c
++++ b/random/random.c
+@@ -486,25 +486,20 @@ trivfs_append_args (struct trivfs_control *fsys,
+ {
+ error_t err = 0;
+ char *opt;
+-
++
+ pthread_mutex_lock (&global_lock);
+ switch (level)
+ {
+ case 0:
+- {
+ opt = "--weak";
+ break;
+- }
++
+ case 1:
+- {
+ opt = "--fast";
+ break;
+- }
++
+ default:
+- {
+ opt = "--secure";
+- break;
+- }
+ }
+ if (level != DEFAULT_LEVEL)
+ err = argz_add (argz, argz_len, opt);
+--
+2.1.4
+
diff --git a/debian/patches/fixes0003-random-improve-error-handling.patch b/debian/patches/fixes0003-random-improve-error-handling.patch
new file mode 100644
index 00000000..9a243ac5
--- /dev/null
+++ b/debian/patches/fixes0003-random-improve-error-handling.patch
@@ -0,0 +1,73 @@
+From 5f7601f47a3fd8957a52c03f1135534fc2232539 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 6 Nov 2015 12:00:31 +0100
+Subject: [PATCH hurd 3/4] random: improve error handling
+
+* random/random.c (arrange_shutdown_notification): Improve error
+handling.
+(main): Display warning if arranging the shutdown notification failed.
+---
+ random/random.c | 22 +++++++++++++---------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/random/random.c b/random/random.c
+index 9ade161..f483a5d 100644
+--- a/random/random.c
++++ b/random/random.c
+@@ -552,7 +552,7 @@ sigterm_handler (int signo)
+ raise (SIGTERM);
+ }
+
+-void
++static error_t
+ arrange_shutdown_notification ()
+ {
+ error_t err;
+@@ -570,24 +570,26 @@ arrange_shutdown_notification ()
+ err = ports_create_port (shutdown_notify_class, fsys->pi.bucket,
+ sizeof (struct port_info), &pi);
+ if (err)
+- return;
++ return err;
+
+ procserver = getproc ();
+- if (!procserver)
+- return;
++ if (! MACH_PORT_VALID (procserver))
++ return EMIG_SERVER_DIED;
+
+ err = proc_getmsgport (procserver, 1, &initport);
+ mach_port_deallocate (mach_task_self (), procserver);
+ if (err)
+- return;
++ return err;
+
+ notify = ports_get_send_right (pi);
+ ports_port_deref (pi);
+- startup_request_notification (initport, notify,
+- MACH_MSG_TYPE_MAKE_SEND,
+- program_invocation_short_name);
++ err = startup_request_notification (initport, notify,
++ MACH_MSG_TYPE_MAKE_SEND,
++ program_invocation_short_name);
++
+ mach_port_deallocate (mach_task_self (), notify);
+ mach_port_deallocate (mach_task_self (), initport);
++ return err;
+ }
+
+
+@@ -621,7 +623,9 @@ main (int argc, char **argv)
+ if (err)
+ error (3, err, "trivfs_startup");
+
+- arrange_shutdown_notification ();
++ err = arrange_shutdown_notification ();
++ if (err)
++ error (0, err, "Cannot request shutdown notification");
+
+ /* Launch. */
+ ports_manage_port_operations_multithread (fsys->pi.bucket, random_demuxer,
+--
+2.1.4
+
diff --git a/debian/patches/fixes0004-random-use-servers-startup-to-register-for-shutdown-.patch b/debian/patches/fixes0004-random-use-servers-startup-to-register-for-shutdown-.patch
new file mode 100644
index 00000000..9da5ed98
--- /dev/null
+++ b/debian/patches/fixes0004-random-use-servers-startup-to-register-for-shutdown-.patch
@@ -0,0 +1,53 @@
+From 710201a5db7bcd1c13364eccca65d8b13c1d0d65 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 6 Nov 2015 12:06:32 +0100
+Subject: [PATCH hurd 4/4] random: use /servers/startup to register for
+ shutdown notifications
+
+* random/random.c (arrange_shutdown_notification): Use the new way to
+contact the startup server.
+---
+ random/random.c | 13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/random/random.c b/random/random.c
+index f483a5d..f926b7f 100644
+--- a/random/random.c
++++ b/random/random.c
+@@ -17,6 +17,7 @@
+
+ #define _GNU_SOURCE 1
+
++#include <hurd/paths.h>
+ #include <hurd/trivfs.h>
+ #include <hurd/startup.h>
+ #include <stdio.h>
+@@ -557,7 +558,6 @@ arrange_shutdown_notification ()
+ {
+ error_t err;
+ mach_port_t initport, notify;
+- process_t procserver;
+ struct port_info *pi;
+
+ shutdown_notify_class = ports_create_class (0, 0);
+@@ -572,14 +572,9 @@ arrange_shutdown_notification ()
+ if (err)
+ return err;
+
+- procserver = getproc ();
+- if (! MACH_PORT_VALID (procserver))
+- return EMIG_SERVER_DIED;
+-
+- err = proc_getmsgport (procserver, 1, &initport);
+- mach_port_deallocate (mach_task_self (), procserver);
+- if (err)
+- return err;
++ initport = file_name_lookup (_SERVERS_STARTUP, 0, 0);
++ if (! MACH_PORT_VALID (initport))
++ return errno;
+
+ notify = ports_get_send_right (pi);
+ ports_port_deref (pi);
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 0449c3ff..c01efa7c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -56,3 +56,7 @@ introspection0006-libpager-annotate-objects-managed-by-libports.patch
introspection0007-ext2fs-annotate-objects-managed-by-libports.patch
introspection0008-utils-rpctrace-support-attaching-to-servers.patch
introspection0009-pflocal-annotate-objects-managed-by-libports.patch
+fixes0001-Remove-unused-variables.patch
+fixes0002-random-fix-odd-formatting.patch
+fixes0003-random-improve-error-handling.patch
+fixes0004-random-use-servers-startup-to-register-for-shutdown-.patch