From 27e878bbf97e9d7b0816ff591ab0ea21fcc63c43 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 11 Jun 1997 15:35:33 +0000 Subject: Tue Jun 10 21:54:52 1997 Thomas Bushnell, n/BSG * 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. --- serverboot/ChangeLog | 8 +++++++ serverboot/bootstrap.c | 56 +++++++++++++++++++++++++++++-------------------- serverboot/disk_inode.h | 4 ++-- 3 files changed, 43 insertions(+), 25 deletions(-) (limited to 'serverboot') 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 + + * 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 * 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 @@ -171,38 +171,48 @@ 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; -- cgit v1.2.3