mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-27 12:03:42 +08:00
add --version/-V command line option
This commit is contained in:
parent
9f2d3fce40
commit
cda5e8ba4c
@ -2012,11 +2012,12 @@ static int parse_options(int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
|
||||
static const char *sopt = "-o:hv";
|
||||
static const char *sopt = "-o:hvV";
|
||||
static const struct option lopt[] = {
|
||||
{ "options", required_argument, NULL, 'o' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "verbose", no_argument, NULL, 'v' },
|
||||
{ "version", no_argument, NULL, 'V' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
@ -2063,6 +2064,10 @@ static int parse_options(int argc, char *argv[])
|
||||
* we don't use it because mount(8) passes it.
|
||||
*/
|
||||
break;
|
||||
case 'V':
|
||||
ntfs_log_info("%s %s %s %d\n", EXEC_NAME, VERSION,
|
||||
FUSE_TYPE, fuse_version());
|
||||
exit(0);
|
||||
default:
|
||||
ntfs_log_error("%s: Unknown option '%s'.\n", EXEC_NAME,
|
||||
argv[optind - 1]);
|
||||
|
Loading…
Reference in New Issue
Block a user