aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/syslinux/files/patch-libinstaller-syslxopt.c
blob: c23156d4fc680e2b76347f1a1c72c72190c45fd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- libinstaller/syslxopt.c.orig    2010-10-20 21:25:38.000000000 +0200
+++ libinstaller/syslxopt.c 2010-11-16 15:09:16.897550744 +0100
@@ -44,6 +44,8 @@
     .activate_partition = 0,
     .force = 0,
     .bootsecfile = NULL,
+    .verbose = 0,
+    .bimage = NULL,
 };
 
 const struct option long_options[] = {
@@ -57,7 +59,7 @@
     {"stupid", 0, NULL, 's'},
     {"heads", 1, NULL, 'H'},
     {"raid-mode", 0, NULL, 'r'},
-    {"version", 0, NULL, 'v'},
+    {"version", 0, NULL, 'V'},
     {"help", 0, NULL, 'h'},
     {"once", 1, NULL, OPT_ONCE},
     {"clear-once", 0, NULL, 'O'},
@@ -65,10 +67,12 @@
     {"menu-save", 1, NULL, 'M'},
     {"mbr", 0, NULL, 'm'}, /* DOS/Win32 only */
     {"active", 0, NULL, 'a'},  /* DOS/Win32 only */
+    {"verbose", 0, NULL, 'v' },
+    {"bimage", 1, NULL, 'b' },
     {0, 0, 0, 0}
 };
 
-const char short_options[] = "t:fid:UuzsS:H:rvho:OM:ma";
+const char short_options[] = "t:fid:UuzsS:H:rVho:OM:mavb:";
 
 void __attribute__ ((noreturn)) usage(int rv, enum syslinux_mode mode)
 {
@@ -109,7 +113,9 @@
        "  --raid       -r  Fall back to the next device on boot failure\n"
        "  --once=...   %s  Execute a command once upon boot\n"
        "  --clear-once -O  Clear the boot-once command\n"
-       "  --reset-adv      Reset auxilliary data\n",
+       "  --reset-adv      Reset auxilliary data\n"
+       "  --bimage=#   -b  Load a custom boot image\n"
+       "  --verbose    -v  Increase verbosity level\n",
        mode == MODE_SYSLINUX  ? "  " : "-o");
     /*
      * Have to chop this roughly in half for the DOS installer due
@@ -209,11 +215,17 @@
    case 'a':
        opt.activate_partition = 1;
        break;
-   case 'v':
+   case 'V':
        fprintf(stderr,
            "%s " VERSION_STR "  Copyright 1994-" YEAR_STR
            " H. Peter Anvin et al\n", program);
        exit(0);
+   case 'v':
+       opt.verbose = 1;
+       break;
+   case 'b':
+       opt.bimage = optarg;
+       break;
    default:
        fprintf(stderr, "%s: Unknown option: -%c\n", program, optopt);
        usage(EX_USAGE, mode);