summaryrefslogtreecommitdiff
path: root/libinstaller/syslxopt.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-07-30 10:17:52 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-07-30 10:17:52 -0700
commit49bb41902a040fe8ef9aa46c82c568d797052f39 (patch)
tree9fd1c7770fdf62ea2f16218fad1d83334373a22b /libinstaller/syslxopt.c
parented879e7b26cda15f191a2ef337a959be46601757 (diff)
downloadsyslinux-49bb41902a040fe8ef9aa46c82c568d797052f39.tar.gz
syslxopt: fix fatal warnings
Fix fatal warnings in syslxopt.c partly due to legal but non-idiomatic use of switch(). Since the only purpose was to conditionalize single output statements, just do it explicitly. In addition, since they are conditional messages, there is no need to explain when they apply. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller/syslxopt.c')
-rw-r--r--libinstaller/syslxopt.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/libinstaller/syslxopt.c b/libinstaller/syslxopt.c
index 786e3d7f..cc7555fb 100644
--- a/libinstaller/syslxopt.c
+++ b/libinstaller/syslxopt.c
@@ -101,7 +101,7 @@ void __attribute__ ((noreturn)) usage(int rv, enum syslinux_mode mode)
fprintf(stderr,
" --install -i Install over the current bootsector\n"
- " --update -U Update a previous EXTLINUX installation\n"
+ " --update -U Update a previous installation\n"
" --zip -z Force zipdrive geometry (-H 64 -S 32)\n"
" --sectors=# -S Force the number of sectors per track\n"
" --heads=# -H Force number of heads\n"
@@ -111,18 +111,21 @@ void __attribute__ ((noreturn)) usage(int rv, enum syslinux_mode mode)
" --clear-once -O Clear the boot-once command\n"
" --reset-adv Reset auxilliary data\n",
mode == MODE_SYSLINUX ? " " : "-o");
- /* Have to chop this roughly in half for the DOS installer for some reason */
+ /*
+ * Have to chop this roughly in half for the DOS installer due
+ * to limited output buffer size
+ */
fprintf(stderr,
" --menu-save= -M Set the label to select as default on the next boot\n");
- switch (mode) {
- case MODE_SYSLINUX_DOSWIN:
+ if (mode == MODE_SYSLINUX_DOSWIN)
fprintf(stderr,
- " --mbr -m Install an MBR (DOS/Win32 installers only)\n"
- " --active -a Mark partition as active (DOS/Win32 installers only)\n");
- case MODE_SYSLINUX:
+ " --mbr -m Install an MBR\n"
+ " --active -a Mark partition as active\n");
+
+ if (mode == MODE_SYSLINUX_DOSWIN || mode == MODE_SYSLINUX)
fprintf(stderr,
- " --force -f Ignore precautions (DOS/Win32/mtools installers only)\n");
- }
+ " --force -f Ignore precautions\n");
+
fprintf(stderr,
"\n"
" Note: geometry is determined at boot time for devices which\n"