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/bootstrap.c | 56 +++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 23 deletions(-) (limited to 'serverboot/bootstrap.c') 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 -- cgit v1.2.3