summaryrefslogtreecommitdiff
path: root/pci-arbiter/main.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-04 19:36:51 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-04 19:36:51 +0200
commit651df2e03f3eb2fcca3446174625dda77b94bcc6 (patch)
treebbbfa0e6c13b13439bc2dea2ed303bd0f655d850 /pci-arbiter/main.c
parentbef0f49eff0eb113e551b7cf1f552364f8d805c7 (diff)
pci-arbiter: restore code that allows it to run non-bootstrap
* pci-arbiter/pcifs.h (init_root_node): Restore underlying_node parameter. * pci-arbiter/pcifs.c (underlying_stat): Drop global variable. (init_root_node): Restore getting the stat from the underlying node. * pci-arbiter/main.c (main): Restore calling netfs_startup in non-bootstrap case, and pass underlying node to init_root_node. Only call pcifs_startup in bootstrap case.
Diffstat (limited to 'pci-arbiter/main.c')
-rw-r--r--pci-arbiter/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pci-arbiter/main.c b/pci-arbiter/main.c
index 050f1aac..4f4f13da 100644
--- a/pci-arbiter/main.c
+++ b/pci-arbiter/main.c
@@ -205,6 +205,7 @@ main (int argc, char **argv)
mach_port_t bootstrap;
mach_port_t disk_server_task;
pthread_t t, nt;
+ file_t underlying_node = MACH_PORT_NULL;
/* Parse options */
alloc_file_system (&fs);
@@ -245,12 +246,16 @@ main (int argc, char **argv)
machdev_trivfs_server(bootstrap);
/* Timer started, quickly do all these next, before we call rump_init */
+ if (disk_server_task == MACH_PORT_NULL)
+ underlying_node = netfs_startup (bootstrap, O_READ);
+
/* Create the root node first */
- err = init_root_node ();
+ err = init_root_node (underlying_node);
if (err)
error (1, err, "Creating the root node");
-
- pcifs_startup (bootstrap, O_READ);
+
+ if (disk_server_task != MACH_PORT_NULL)
+ pcifs_startup (bootstrap, O_READ);
err = init_file_system (fs);
if (err)