summaryrefslogtreecommitdiff
path: root/debian/patches/0002-libdiskfs-fixes-XXX.patch
blob: a2cf89a793c4e3cf232fb528689d4d66b5620d01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 90d7aaf2a272cf726d54ad000f502fae8c69e7b0 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Tue, 13 Jan 2015 18:59:29 +0100
Subject: [PATCH hurd 2/5] libdiskfs: fixes XXX

---
 libdiskfs/boot-start.c   |  3 ++-
 libdiskfs/init-init.c    | 10 +++++-----
 libdiskfs/init-startup.c |  3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 9be8ed2..302a403 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -465,7 +465,8 @@ diskfs_S_fsys_init (struct diskfs_control *pt,
   struct peropen *rootpo;
 
   if (!pt
-      || pt->pi.class != diskfs_initboot_class)
+      || (pt->pi.class != diskfs_initboot_class
+          && pt->pi.class != diskfs_control_class)) // XXX
     return EOPNOTSUPP;
   
   if (initdone)
diff --git a/libdiskfs/init-init.c b/libdiskfs/init-init.c
index 7a7f248..bc25bbe 100644
--- a/libdiskfs/init-init.c
+++ b/libdiskfs/init-init.c
@@ -71,14 +71,14 @@ diskfs_init_diskfs (void)
 	  diskfs_default_pager = MACH_PORT_NULL;
 	  err = vm_set_default_memory_manager (host, &diskfs_default_pager);
 	  mach_port_deallocate (mach_task_self (), host);
-
-	  if (!err)
-	    err = maptime_map (1, 0, &diskfs_mtime);
 	}
+      if (err)
+	return err;
     }
-  else
-    err = maptime_map (0, 0, &diskfs_mtime);
 
+  err = maptime_map (0, 0, &diskfs_mtime);
+  if (err)
+    err = maptime_map (1, 0, &diskfs_mtime);
   if (err)
     return err;
 
diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
index 3a588e1..a3a0d2d 100644
--- a/libdiskfs/init-startup.c
+++ b/libdiskfs/init-startup.c
@@ -106,7 +106,8 @@ diskfs_startup_diskfs (mach_port_t bootstrap, int flags)
       mach_port_deallocate (mach_task_self (), bootstrap);
       _diskfs_ncontrol_ports++;
 
-      _diskfs_init_completed ();
+      if (MACH_PORT_VALID (getproc ())) //XXX
+        _diskfs_init_completed ();
     }
   else
     {
-- 
2.1.4