summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-09-29 22:17:57 +0000
committerRoland McGrath <roland@gnu.org>1994-09-29 22:17:57 +0000
commit0ee74b5b66d79eba411f8fc57545a1140b0bd799 (patch)
tree4b6d265085b146e5896119d5643d3c8db5bc2220 /ufs
parentc427330289e857525ac44e0f428343868bba405e (diff)
Formerly main.c.~23~
Diffstat (limited to 'ufs')
-rw-r--r--ufs/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ufs/main.c b/ufs/main.c
index 5f41265b..65da85bb 100644
--- a/ufs/main.c
+++ b/ufs/main.c
@@ -23,6 +23,7 @@
#include <hurd/startup.h>
#include <fcntl.h>
#include <unistd.h>
+#include <stdlib.h>
char *ufs_version = "0.0 pre-alpha";
@@ -102,10 +103,10 @@ main (int argc, char **argv)
mutex_init (&printf_lock); /* XXX */
- task_get_bootstrap_port (mach_task_self (), &bootstrap);
-
- if (bootstrap)
+ if (getpid () > 0)
{
+ /* We are in a normal Hurd universe, started as a translator. */
+
devname = trans_parse_args (argc, argv);
{
@@ -120,10 +121,13 @@ main (int argc, char **argv)
}
else
{
+ /* We are the bootstrap filesystem. */
devname = diskfs_parse_bootargs (argc, argv);
compat_mode = COMPAT_GNU;
}
+ task_get_bootstrap_port (mach_task_self (), &bootstrap);
+
/* Initialize the diskfs library. This must come before
any other diskfs call. */
diskfs_init_diskfs ();