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 d73aa6e4ced897daeb158d924306787c4ff25096 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 03/10] 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 d10d783..e6d593f 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 357960b..3c42b3d 100644
--- a/libdiskfs/init-init.c
+++ b/libdiskfs/init-init.c
@@ -69,14 +69,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 14da003..404b1a5 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
|