summaryrefslogtreecommitdiff
path: root/debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-27 22:08:52 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-27 22:08:52 +0200
commit8faccce60ee5736e6e75c0f74620dfa68ab24b90 (patch)
tree8ff68ee0df90d01e1fd25773146faca2e6fad426 /debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch
parentf528223eb6cf63953c8c616aade6ff53c8e18efd (diff)
drop old patch series
Diffstat (limited to 'debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch')
-rw-r--r--debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch151
1 files changed, 0 insertions, 151 deletions
diff --git a/debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch b/debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch
deleted file mode 100644
index e5e32fa4..00000000
--- a/debian/patches/random-fixes0006-trans-crash-convert-to-trivfs-dynamic-classes-and-bu.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From c1dd153d9602b855771b3f6d3adc853bf8c3c379 Mon Sep 17 00:00:00 2001
-From: Justus Winter <4winter@informatik.uni-hamburg.de>
-Date: Sun, 27 Sep 2015 17:07:18 +0200
-Subject: [PATCH hurd 6/9] trans/crash: convert to trivfs dynamic classes and
- buckets
-
-libtrivfs contains two ways of managing more than one port class and
-bucket. There is the old way of using a statically allocated array
-with explicit length, and the new way with dynamically allocated
-vectors.
-
-Converting all users to the new way of handling multiple classes
-and/or buckets, we can simplify the code in libtrivfs. In many cases,
-the code will be simpler and more expressive for the user.
-
-This also fixes a mild bug. The classes and buckets given to
-`trivfs_startup' end up in the dynamic vectors too, making the object
-lookup code use the more complicated code path.
-
-* trans/crash.c: Convert to dynamic classes and buckets.
----
- trans/crash.c | 50 ++++++++++++++++++++++++++++----------------------
- 1 file changed, 28 insertions(+), 22 deletions(-)
-
-diff --git a/trans/crash.c b/trans/crash.c
-index c424b16..23f2a2d 100644
---- a/trans/crash.c
-+++ b/trans/crash.c
-@@ -44,6 +44,10 @@ process_t procserver; /* Our proc port, for easy access. */
- /* Port bucket we service requests on. */
- struct port_bucket *port_bucket;
-
-+/* Our port classes. */
-+struct port_class *trivfs_control_class;
-+struct port_class *trivfs_protid_class;
-+
- /* Trivfs hooks. */
- int trivfs_fstype = FSTYPE_MISC;
- int trivfs_fsid = 0;
-@@ -52,11 +56,6 @@ int trivfs_support_write = 0;
- int trivfs_support_exec = 0;
- int trivfs_allow_open = O_READ|O_WRITE|O_EXEC;
-
--struct port_class *trivfs_protid_portclasses[1];
--struct port_class *trivfs_cntl_portclasses[1];
--int trivfs_protid_nportclasses = 1;
--int trivfs_cntl_nportclasses = 1;
--
- struct trivfs_control *fsys;
-
- enum crash_action
-@@ -156,7 +155,7 @@ S_crash_dump_task (mach_port_t port,
- mach_port_t user_proc = MACH_PORT_NULL;
- enum crash_action how;
-
-- cred = ports_lookup_port (port_bucket, port, trivfs_protid_portclasses[0]);
-+ cred = ports_lookup_port (port_bucket, port, trivfs_protid_class);
- if (! cred)
- return EOPNOTSUPP;
-
-@@ -415,11 +414,11 @@ dead_crasher (void *ptr)
- /* The port data structures are cleaned up when we return. */
-
- /* See if we are going away and this was the last thing keeping us up. */
-- if (ports_count_class (trivfs_cntl_portclasses[0]) == 0)
-+ if (ports_count_class (trivfs_control_class) == 0)
- {
- /* We have no fsys control port, so we are detached from the
- parent filesystem. Maybe we have no users left either. */
-- if (ports_count_class (trivfs_protid_portclasses[0]) == 0)
-+ if (ports_count_class (trivfs_protid_class) == 0)
- {
- /* We have no user ports left. Maybe we have no crashers still
- around either. */
-@@ -428,9 +427,9 @@ dead_crasher (void *ptr)
- exit (0);
- ports_enable_class (crasher_portclass);
- }
-- ports_enable_class (trivfs_protid_portclasses[0]);
-+ ports_enable_class (trivfs_protid_class);
- }
-- ports_enable_class (trivfs_cntl_portclasses[0]);
-+ ports_enable_class (trivfs_control_class);
- }
-
-
-@@ -563,20 +562,27 @@ main (int argc, char **argv)
- /* Fetch our proc server port for easy use. */
- procserver = getproc ();
-
-- port_bucket = ports_create_bucket ();
-- trivfs_cntl_portclasses[0] = ports_create_class (trivfs_clean_cntl, 0);
-- trivfs_protid_portclasses[0] = ports_create_class (trivfs_clean_protid, 0);
- crasher_portclass = ports_create_class (dead_crasher, 0);
-
-+ err = trivfs_add_control_port_class (&trivfs_control_class);
-+ if (err)
-+ error (1, 0, "error creating control port class");
-+
-+ err = trivfs_add_protid_port_class (&trivfs_protid_class);
-+ if (err)
-+ error (1, 0, "error creating protid port class");
-+
- /* Reply to our parent. */
- err = trivfs_startup (bootstrap, 0,
-- trivfs_cntl_portclasses[0], port_bucket,
-- trivfs_protid_portclasses[0], port_bucket,
-- &fsys);
-+ trivfs_control_class, NULL,
-+ trivfs_protid_class, NULL, &fsys);
-+
- mach_port_deallocate (mach_task_self (), bootstrap);
- if (err)
- error (3, err, "Contacting parent");
-
-+ port_bucket = fsys->pi.bucket;
-+
- /* Launch. */
- do
- ports_manage_port_operations_multithread (port_bucket, crash_demuxer,
-@@ -602,11 +608,11 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
- int count;
-
- /* Stop new requests. */
-- ports_inhibit_class_rpcs (trivfs_cntl_portclasses[0]);
-- ports_inhibit_class_rpcs (trivfs_protid_portclasses[0]);
-+ ports_inhibit_class_rpcs (trivfs_control_class);
-+ ports_inhibit_class_rpcs (trivfs_protid_class);
-
- /* Are there any extant user ports for the /servers/crash file? */
-- count = ports_count_class (trivfs_protid_portclasses[0]);
-+ count = ports_count_class (trivfs_protid_class);
- if (count == 0 || (flags & FSYS_GOAWAY_FORCE))
- {
- /* No users. Disconnect from the filesystem. */
-@@ -629,9 +635,9 @@ trivfs_goaway (struct trivfs_control *fsys, int flags)
- else
- {
- /* We won't go away, so start things going again... */
-- ports_enable_class (trivfs_protid_portclasses[0]);
-- ports_resume_class_rpcs (trivfs_cntl_portclasses[0]);
-- ports_resume_class_rpcs (trivfs_protid_portclasses[0]);
-+ ports_enable_class (trivfs_protid_class);
-+ ports_resume_class_rpcs (trivfs_control_class);
-+ ports_resume_class_rpcs (trivfs_protid_class);
-
- return EBUSY;
- }
---
-2.1.4
-