From fa6d94a16234683002235bea6d333162ba292da8 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Fri, 15 Apr 2011 15:28:31 -0300 Subject: [PATCH] syslinux: check --update option properly Signed-off-by: Paulo Alcantara --- linux/syslinux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/syslinux.c b/linux/syslinux.c index 97b6a30..c7a9ecc 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; -- 2.7.4