1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-13 05:44:19 +03:00

dmsetup: make '--timestamps' set --headers=time

Make '--timestamps' a shorthand for --headers=time.
This commit is contained in:
Bryn M. Reeves
2015-07-27 12:12:08 +01:00
parent 8ca04e316e
commit 8df54e25c6

View File

@@ -5444,6 +5444,16 @@ static int _process_switches(int *argcp, char ***argvp, const char *dev_dir)
return 0;
}
if (_switches[TIME_ARG] && _switches[HEADERS_ARG]) {
fprintf(stderr, "Use one of --timestamps and --headers.");
return 0;
}
if (_switches[TIME_ARG]) {
_switches[HEADERS_ARG]++;
_string_args[HEADERS_ARG] = (char *) "time";
}
/* everything has a count of at least 1 */
if (!_int_args[COUNT_ARG])
_int_args[COUNT_ARG]++;