[syslinux:master] syslinux: check --update option properly

syslinux-bot for Paulo Alcantara pcacjr at gmail.com
Mon Apr 18 14:15:03 PDT 2011


Commit-ID:  fa6d94a16234683002235bea6d333162ba292da8
Gitweb:     http://syslinux.zytor.com/commit/fa6d94a16234683002235bea6d333162ba292da8
Author:     Paulo Alcantara <pcacjr at gmail.com>
AuthorDate: Fri, 15 Apr 2011 15:28:31 -0300
Committer:  Paulo Alcantara <pcacjr at gmail.com>
CommitDate: Fri, 15 Apr 2011 15:28:31 -0300

syslinux: check --update option properly

Signed-off-by: Paulo Alcantara <pcacjr at gmail.com>


---
 linux/syslinux.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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;



More information about the Syslinux-commits mailing list