X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2Flilo.c;h=a7db8032dce4bb0f6ebd951dd4ef4a4aa2212356;hb=0fbc23b104256965cbb3678e85a0ae55a5149c58;hp=a4e4522776d3b8677ed3d1f185d5b573bb0980c1;hpb=23c77cc092dbbb1e12c47c2b0021d4476b543702;p=rrq%2Fmaintain_lilo.git diff --git a/src/lilo.c b/src/lilo.c index a4e4522..a7db803 100644 --- a/src/lilo.c +++ b/src/lilo.c @@ -2,7 +2,7 @@ * * Copyright 1992-1998 Werner Almesberger * Copyright 1999-2007 John Coffman - * Copyright 2009-2010 Joachim Wiedorn + * Copyright 2009-2015 Joachim Wiedorn * All rights reserved. * * Licensed under the terms contained in the file 'COPYING' @@ -193,11 +193,12 @@ extern int has_partitions_beta(dev_t dev); /* defined in geometry.c */ "l=%d, ll=%d, f=%d, d=%d, ld=%d\n", MAX_IMAGES, (int)sizeof(char), (int)sizeof(short), (int)sizeof(int), - (int)sizeof(long), (int)sizeof( + (int)sizeof(int32_t), (int)sizeof( #if !__MSDOS__ - long + int64_t), +#else + int32_t), #endif /* !__MSDOS__ */ - long), (int)sizeof(float), (int)sizeof(double), (int)sizeof(long double) ); @@ -542,6 +543,7 @@ static void usage(char *name) fprintf(errstd,"%7s%s [ -C config_file ] -I name [ options ]\n","",name); fprintf(errstd,"%7s%s [ -C config_file ] [ -s save_file ] " "-u | -U [ boot_device ]\n","",name); + fprintf(errstd,"%7s%s -H\t\t\t\tinstall only to active discs (RAID-1)\n", "", name); fprintf(errstd,"%7s%s -A /dev/XXX [ N ]\t\tinquire/activate a partition\n","",name); fprintf(errstd,"%7s%s -M /dev/XXX [ mbr | ext ]\tinstall master boot record\n","",name); fprintf(errstd,"%7s%s -T help \t\t\tlist additional options\n", "", name); @@ -718,7 +720,7 @@ fprintf(errstd,"argc=%d, *argv=%s, ch=%c param=%s\n", argc, *argv, ch, param); if (*(param = (*argv)+2)) argc++; else if (argc) param = *++argv; else reboot_arg = ""; - + while (argc) { if (!reboot_arg) *(reboot_arg = alloc(strlen(param)+1)) = 0; @@ -730,9 +732,6 @@ fprintf(errstd,"argc=%d, *argv=%s, ch=%c param=%s\n", argc, *argv, ch, param); strcat(reboot_arg, param); argc--; } -#if 0 -fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg); -#endif break; #if !__MSDOS__ case 's': @@ -766,7 +765,7 @@ fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg); param = *++argv; argc--; } - if (param) + if (param) verbose = to_number(param); else if (verbose<0) verbose = 1; @@ -815,34 +814,34 @@ fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg); if (version+activate+instmbr+(tell_param!=NULL) > 1) usage(name); if (activate) do_activate(act1, act2); #endif /* !__MSDOS__ */ + if (verbose > 0 || version) { - printf("LILO version %d.%d%s%s", VERSION_MAJOR, VERSION_MINOR, - VERSION_EDIT, test ? " (test mode)" : ""); - if (version && verbose<=0) { - printf("\n"); - return 0; - } - printf("\n * Copyright (C) 1992-1998 Werner Almesberger (until v20)\n" - " * Copyright (C) 1999-2007 John Coffman (until v22)\n" - " * Copyright (C) 2009-2010 Joachim Wiedorn (since v23)\n" - "This program comes with ABSOLUTELY NO WARRANTY. This is free software \n" - "distributed under the BSD License (3-clause). Details can be found in \n" - "the file COPYING, which is distributed with this software.\n" - ); + printf("LILO version %d.%d%s", VERSION_MAJOR, VERSION_MINOR, VERSION_EDIT); + if (test) + printf(" (test mode)\n"); + else + printf(" (released %s)\n", VERSION_DATE); + if (version && verbose<=0) { + /* exit if user asks for version and no verbose */ + return 0; + } + printf(" * Copyright (C) 1992-1998 Werner Almesberger (until v20)\n" + " * Copyright (C) 1999-2007 John Coffman (until v22)\n" + " * Copyright (C) 2009-2015 Joachim Wiedorn (since v23)\n" + "This program comes with ABSOLUTELY NO WARRANTY. This is free software \n" + "distributed under the BSD License (3-clause). Details can be found in \n" + "the file COPYING, which is distributed with this software.\n" + ); if (verbose>0) { #if !__MSDOS__ -#include - struct utsname buf; -#endif - printf("Released %s%s and compiled at %s on %s%s\n", - VERSION_DATE, comma ? "," : "", __TIME__, __DATE__, semi); -#if !__MSDOS__ - if (verbose>=2 && uname(&buf)==0) { - printf("Running %s kernel %s on %s\n", - buf.sysname, buf.release, buf.machine); - } + #include + struct utsname buf; + if (verbose>=2 && uname(&buf)==0) { + printf("Running %s kernel %s on %s\n", + buf.sysname, buf.release, buf.machine); + } #endif - } + } printf("\n"); if (version) { if (verbose>=2) configuration();