aboutsummaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorPaulo Alcantara <pcacjr@gmail.com>2011-04-15 15:28:31 -0300
committerPaulo Alcantara <pcacjr@gmail.com>2011-04-15 15:28:31 -0300
commitfa6d94a16234683002235bea6d333162ba292da8 (patch)
treedd062592c072d910370682cf3355fcfcf7003d34 /linux
parent205b829d0d9b6a6fe72b49b7ab763c75e27ebcdc (diff)
downloadsyslinux-fa6d94a16234683002235bea6d333162ba292da8.tar.gz
syslinux-fa6d94a16234683002235bea6d333162ba292da8.tar.xz
syslinux-fa6d94a16234683002235bea6d333162ba292da8.zip
syslinux: check --update option properly
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Diffstat (limited to 'linux')
-rwxr-xr-xlinux/syslinux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/syslinux.c b/linux/syslinux.c
index 97b6a306..c7a9ecc4 100755
--- a/linux/syslinux.c
+++ b/linux/syslinux.c
@@ -382,6 +382,10 @@ int main(int argc, char *argv[])
sync();
rmdir(mntpath);
exit(0);
+ } else if (opt.update_only && !syslinux_already_installed(dev_fd)) {
+ fprintf(stderr, "%s: no previous syslinux boot sector found\n",
+ argv[0]);
+ exit(1);
} else {
fprintf(stderr, "%s: please specify --install or --update for the future\n", argv[0]);
opt.update_only = 0;