aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>1999-03-17 20:01:05 +0000
committerhpa <hpa>1999-03-17 20:01:05 +0000
commit80ff29b2122f76c75bd4dd6b771fdfaa44d5e659 (patch)
treea56c587c60a6308c2ae094acee2a525f34e5af7e
parent5be33c7eb1e6e6f6d9de4b8e5e4a0e81ebd8641f (diff)
downloadsyslinux.git-80ff29b2122f76c75bd4dd6b771fdfaa44d5e659.tar.gz
syslinux.git-80ff29b2122f76c75bd4dd6b771fdfaa44d5e659.tar.xz
syslinux.git-80ff29b2122f76c75bd4dd6b771fdfaa44d5e659.zip
Add -f to override device check
-rw-r--r--syslinux.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/syslinux.c b/syslinux.c
index 1097afea..3551a044 100644
--- a/syslinux.c
+++ b/syslinux.c
@@ -1,7 +1,7 @@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
*
- * Copyright 1998 H. Peter Anvin - All Rights Reserved
+ * Copyright 1998-1999 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -119,6 +119,7 @@ int main(int argc, char *argv[])
char *mntpath = NULL, mntname[64];
char *ldlinux_name, **argp, *opt;
int my_umask;
+ int force = 0; /* -f (force) option */
program = argv[0];
@@ -133,6 +134,8 @@ int main(int argc, char *argv[])
while ( *opt ) {
if ( *opt == 's' ) {
make_stupid(); /* Use "safe, slow and stupid" code */
+ } else if ( *opt == 'f' ) {
+ force = 1;
} else {
usage();
}
@@ -159,7 +162,7 @@ int main(int argc, char *argv[])
}
if ( !S_ISBLK(st.st_mode) && !S_ISREG(st.st_mode) ) {
- fprintf(stderr, "%s: not a block device or regular file\n", device);
+ fprintf(stderr, "%s: not a block device or regular file (use -f to override)\n", device);
exit(1);
}