summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-06-11 15:35:33 +0000
committerThomas Bushnell <thomas@gnu.org>1997-06-11 15:35:33 +0000
commit27e878bbf97e9d7b0816ff591ab0ea21fcc63c43 (patch)
tree595cb18c30d25ee44b2d58f391263de64359a105
parent34074b545aa7da28a88e80d6515822e8afce14d5 (diff)
Tue Jun 10 21:54:52 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* disk_inode.h (struct icommon): Use short instead of uid_t/gid_t in structure definition; those are now 32 bit types. * bootstrap.c (main): Support running from command line too; this is useful at least for simple debugging.
-rw-r--r--serverboot/ChangeLog8
-rw-r--r--serverboot/bootstrap.c56
-rw-r--r--serverboot/disk_inode.h4
3 files changed, 43 insertions, 25 deletions
diff --git a/serverboot/ChangeLog b/serverboot/ChangeLog
index 0ddcae91..79b9c123 100644
--- a/serverboot/ChangeLog
+++ b/serverboot/ChangeLog
@@ -1,3 +1,11 @@
+Tue Jun 10 21:54:52 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * disk_inode.h (struct icommon): Use short instead of uid_t/gid_t
+ in structure definition; those are now 32 bit types.
+
+ * bootstrap.c (main): Support running from command line too; this
+ is useful at least for simple debugging.
+
1997-06-09 Miles Bader <miles@gnu.ai.mit.edu>
* Makefile (LCLHDRS): Add mach-exec.h.
diff --git a/serverboot/bootstrap.c b/serverboot/bootstrap.c
index 49a8e00b..d238e8bb 100644
--- a/serverboot/bootstrap.c
+++ b/serverboot/bootstrap.c
@@ -172,37 +172,47 @@ main(argc, argv)
cthread_wait_stack_size = 4 * 1024;
/*
- * Parse the arguments.
- */
- if (argc < 5)
- panic("bootstrap: not enough arguments");
-
- /*
- * Arg 0 is program name
- */
-
- /*
* Arg 1 is flags
*/
if (argv[1][0] != '-')
- panic("bootstrap: no flags");
-
+ panic("bootstrap: no flags");
+
flag_string = argv[1];
-
+
/*
- * Arg 2 is host port number
+ * Parse the arguments.
*/
- bootstrap_master_host_port = atoi(argv[2]);
+ if (argc >= 5)
+ {
+ /*
+ * Arg 0 is program name
+ */
- /*
- * Arg 3 is device port number
- */
- bootstrap_master_device_port = atoi(argv[3]);
+ /*
+ * Arg 2 is host port number
+ */
+ bootstrap_master_host_port = atoi(argv[2]);
- /*
- * Arg 4 is root name
- */
- root_name = argv[4];
+ /*
+ * Arg 3 is device port number
+ */
+ bootstrap_master_device_port = atoi(argv[3]);
+
+ /*
+ * Arg 4 is root name
+ */
+ root_name = argv[4];
+ }
+ else if (argc == 3)
+ {
+ root_name = argv[2];
+
+ get_privileged_ports (&bootstrap_master_host_port,
+ &bootstrap_master_device_port);
+ }
+
+
+
printf_init(bootstrap_master_device_port);
#ifdef pleasenoXXX
diff --git a/serverboot/disk_inode.h b/serverboot/disk_inode.h
index e0f49ea3..6eed9104 100644
--- a/serverboot/disk_inode.h
+++ b/serverboot/disk_inode.h
@@ -61,8 +61,8 @@
struct icommon {
u_short ic_mode; /* 0: mode and type of file */
short ic_nlink; /* 2: number of links to file */
- uid_t ic_uid; /* 4: owner's user id */
- gid_t ic_gid; /* 6: owner's group id */
+ short ic_uid; /* 4: owner's user id */
+ short ic_gid; /* 6: owner's group id */
quad ic_size; /* 8: number of bytes in file */
time_t ic_atime; /* 16: time last accessed */
int ic_atspare;