From 813354f56d24c18e33fcc8775dbaa9bb25f08530 Mon Sep 17 00:00:00 2001 From: antona Date: Fri, 30 Sep 2005 19:24:13 +0000 Subject: [PATCH] Add missing options to mkntfs' getopt() parsing string. (What a silly bug!) Fix a compile warning in ntfscmp. --- ntfsprogs/mkntfs.c | 10 +++++----- ntfsprogs/ntfscmp.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ntfsprogs/mkntfs.c b/ntfsprogs/mkntfs.c index 4097a1b4..ab32a1fc 100644 --- a/ntfsprogs/mkntfs.c +++ b/ntfsprogs/mkntfs.c @@ -169,8 +169,8 @@ ntfs_volume *vol; char *dev_name; struct { - long long part_start_sect; /* start sector of partition on parent - device */ + long long part_start_sect; /* -p, start sector of partition on + parent device */ long long nr_sectors; /* size of device in sectors */ long long nr_clusters; /* Note: Win2k treats clusters as 32-bit entities! */ @@ -198,9 +198,9 @@ struct { u32 upcase_len; /* Determined automatically. */ int sector_size; /* -s, in bytes, power of 2, default is 512 bytes. */ - int sectors_per_track; /* number of sectors per track on + int sectors_per_track; /* -S, number of sectors per track on device */ - int heads; /* number of heads on device */ + int heads; /* -H, number of heads on device */ int quiet; /* -q, quiet execution. */ int verbose; /* -v, verbose execution, given twice, * really verbose execution (debug @@ -357,7 +357,7 @@ static void parse_options(int argc, char *argv[]) if (argc && *argv) EXEC_NAME = *argv; fprintf(stderr, "%s v%s\n", EXEC_NAME, VERSION); - while ((c = getopt(argc, argv, "c:fh?np:qs:vz:CFTIL:QVl")) != EOF) + while ((c = getopt(argc, argv, "c:fH:h?np:qS:s:vz:CFTIL:QVl")) != EOF) switch (c) { case 'n': opts.no_action = 1; diff --git a/ntfsprogs/ntfscmp.c b/ntfsprogs/ntfscmp.c index 72580d7f..2ada65e4 100644 --- a/ntfsprogs/ntfscmp.c +++ b/ntfsprogs/ntfscmp.c @@ -122,6 +122,7 @@ static int err_exit(const char *fmt, ...) exit(1); } +#ifdef DEBUG /** * perr_exit * @@ -144,6 +145,7 @@ static int perr_exit(const char *fmt, ...) fflush(stderr); exit(1); } +#endif /* DEBUG */ /** * usage - Print a list of the parameters to the program