summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-02-24 14:05:23 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-02-24 14:05:23 +0100
commitc697e7f3773194e208bd25edc1519457c88e5cd8 (patch)
treed61fcda527f2fd3e6ec142a0abdefa895739751d /debian/patches
parent45d7e38e63eec1cdd45f5387dec0e5ce85b54f95 (diff)
add some-fixes.patch
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/some-fixes.patch174
2 files changed, 175 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index f2d8ba80..d11b4fc1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -48,3 +48,4 @@ diskfs-fix-fsys-receiver-lookups.patch
netfs-fix-fsys-receiver-lookups.patch
xxx-fix-build.patch
+some-fixes.patch
diff --git a/debian/patches/some-fixes.patch b/debian/patches/some-fixes.patch
new file mode 100644
index 00000000..b6e97a74
--- /dev/null
+++ b/debian/patches/some-fixes.patch
@@ -0,0 +1,174 @@
+diff --git a/libpager/demuxer.c b/libpager/demuxer.c
+index 79c0ddc..9a847fb 100644
+--- a/libpager/demuxer.c
++++ b/libpager/demuxer.c
+@@ -19,22 +19,25 @@
+ #include "memory_object_S.h"
+ #include "notify_S.h"
+
++#include "memory_object_S.h"
++#include "notify_S.h"
++
+ /* Demultiplex a single message directed at a pager port; INP is the
+ message received; fill OUTP with the reply. */
+ int
+ pager_demuxer (mach_msg_header_t *inp,
+ mach_msg_header_t *outp)
+ {
+- extern int _pager_seqnos_memory_object_server (mach_msg_header_t *inp,
+- mach_msg_header_t *outp);
+- extern int _pager_seqnos_notify_server (mach_msg_header_t *inp,
+- mach_msg_header_t *outp);
++ mig_routine_t routine;
++ if ((routine = _pager_seqnos_memory_object_server_routine (inp)) ||
++ (routine = _pager_seqnos_notify_server_routine (inp)))
++ {
++ (*routine) (inp, outp);
++ return TRUE;
++ }
+
+- int result = _pager_seqnos_memory_object_server (inp, outp)
+- || _pager_seqnos_notify_server (inp, outp);
+- if (!result)
+- /* Synchronize our bookkeeping of the port's seqno with the one consumed by
+- this bogus message. */
+- _pager_update_seqno (inp->msgh_local_port, inp->msgh_seqno);
+- return result;
++ /* Synchronize our bookkeeping of the port's seqno with the one
++ consumed by this bogus message. */
++ _pager_update_seqno (inp->msgh_local_port, inp->msgh_seqno);
++ return FALSE;
+ }
+diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
+index 66b8587..0977a5d 100644
+--- a/mach-defpager/default_pager.c
++++ b/mach-defpager/default_pager.c
+@@ -54,7 +54,10 @@
+
+ #include <file_io.h>
+
++#include "memory_object_S.h"
++#include "memory_object_default_S.h"
+ #include "default_pager_S.h"
++#include "exc_S.h"
+
+ #define debug 0
+
+@@ -2921,13 +2924,13 @@ seqnos_memory_object_lock_completed (memory_object_t pager,
+
+ kern_return_t
+ seqnos_memory_object_data_unlock(pager, seqno, pager_request,
+- offset, addr, data_cnt)
++ offset, length, protection_required)
+ memory_object_t pager;
+ mach_port_seqno_t seqno;
+ mach_port_t pager_request;
+ vm_offset_t offset;
+- pointer_t addr;
+- vm_size_t data_cnt;
++ vm_size_t length;
++ vm_prot_t protection_required;
+ {
+ panic("%sdata_unlock",my_name);
+ return(KERN_FAILURE);
+@@ -3019,7 +3022,6 @@ boolean_t default_pager_notify_server(in, out)
+ return TRUE;
+ }
+
+-extern boolean_t seqnos_memory_object_server();
+ extern boolean_t seqnos_memory_object_default_server();
+ extern boolean_t default_pager_server();
+ extern boolean_t exc_server();
+@@ -3028,6 +3030,37 @@ extern void bootstrap_compat();
+
+ mach_msg_size_t default_pager_msg_size_object = 128;
+
++/* Fill in default response. */
++static void
++mig_reply_setup (
++ const mach_msg_header_t *in,
++ mach_msg_header_t *out)
++{
++ static const mach_msg_type_t RetCodeType = {
++ /* msgt_name = */ MACH_MSG_TYPE_INTEGER_32,
++ /* msgt_size = */ 32,
++ /* msgt_number = */ 1,
++ /* msgt_inline = */ TRUE,
++ /* msgt_longform = */ FALSE,
++ /* msgt_deallocate = */ FALSE,
++ /* msgt_unused = */ 0
++ };
++
++#define InP (in)
++#define OutP ((mig_reply_header_t *) out)
++ OutP->Head.msgh_bits =
++ MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InP->msgh_bits), 0);
++ OutP->Head.msgh_size = sizeof *OutP;
++ OutP->Head.msgh_remote_port = InP->msgh_remote_port;
++ OutP->Head.msgh_local_port = MACH_PORT_NULL;
++ OutP->Head.msgh_seqno = 0;
++ OutP->Head.msgh_id = InP->msgh_id + 100;
++ OutP->RetCodeType = RetCodeType;
++ OutP->RetCode = MIG_BAD_ID;
++#undef InP
++#undef OutP
++}
++
+ boolean_t
+ default_pager_demux_object(in, out)
+ mach_msg_header_t *in;
+@@ -3038,15 +3071,23 @@ default_pager_demux_object(in, out)
+ * the memory_object_default interface.
+ */
+
+-int rval;
+-ddprintf ("DPAGER DEMUX OBJECT <%p>: %d\n", in, in->msgh_id);
+-rval =
+- (seqnos_memory_object_server(in, out) ||
+- seqnos_memory_object_default_server(in, out) ||
+- default_pager_notify_server(in, out) ||
+- default_pager_server(in, out));
+-ddprintf ("DPAGER DEMUX OBJECT DONE <%p>: %d\n", in, in->msgh_id);
+-return rval;
++ int rval = FALSE;
++ ddprintf ("DPAGER DEMUX OBJECT <%p>: %d\n", in, in->msgh_id);
++ mig_reply_setup (in, out);
++
++ mig_routine_t routine;
++ if ((routine = seqnos_memory_object_server_routine (in)) ||
++ (routine = seqnos_memory_object_default_server_routine (in)) ||
++ (routine = NULL, default_pager_notify_server (in, out)) ||
++ (routine = default_pager_server_routine (in)))
++ {
++ if (routine)
++ (*routine) (in, out);
++ rval = TRUE;
++ }
++
++ ddprintf ("DPAGER DEMUX OBJECT DONE <%p>: %d\n", in, in->msgh_id);
++ return rval;
+ }
+
+ mach_msg_size_t default_pager_msg_size_default = 8 * 1024;
+diff --git a/utils/umount.c b/utils/umount.c
+index 26d2b56..7901da6 100644
+--- a/utils/umount.c
++++ b/utils/umount.c
+@@ -40,7 +40,7 @@ static char *targets;
+ static size_t targets_len;
+ static int readonly;
+ static int verbose;
+-static int passive_flags = FS_TRANS_SET;
++static int passive_flags;
+ static int active_flags = FS_TRANS_SET;
+ static int goaway_flags;
+ static int source_goaway;
+@@ -139,7 +139,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ return 0;
+ }
+
+-static const char doc[] = "Stop active and remove passive translators";
++static const char doc[] = "Stop active filesystem translators";
+ static const char args_doc[] = "DEVICE|DIRECTORY [DEVICE|DIRECTORY ...]";
+
+ static struct argp fstab_argp_mtab; /* Slightly modified version. */