From: Sami Kerola Date: Fri, 10 Mar 2017 20:14:10 +0000 (+0000) Subject: blkid: simplify version option handling X-Git-Tag: v2.30-rc1~161^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93bdbe199317082da6ddad4fa3882ef311095848;p=thirdparty%2Futil-linux.git blkid: simplify version option handling Signed-off-by: Sami Kerola --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index cc29b5c6c0..eb2ea07351 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -640,7 +640,6 @@ int main(int argc, char **argv) char **fltr_type = NULL; int fltr_flag = BLKID_FLTR_ONLYIN; unsigned int numdev = 0, numtag = 0; - int version = 0; int err = BLKID_EXIT_OTHER; unsigned int i; int output_format = 0; @@ -757,8 +756,8 @@ int main(int argc, char **argv) break; case 'V': case 'v': - version = 1; - break; + print_version(stdout); + goto exit; case 'w': /* ignore - backward compatibility */ break; @@ -778,11 +777,6 @@ int main(int argc, char **argv) devices[numdev++] = argv[optind++]; } - if (version) { - print_version(stdout); - goto exit; - } - /* convert LABEL/UUID lookup to evaluate request */ if (lookup && output_format == OUTPUT_DEVICE_ONLY && search_type && (!strcmp(search_type, "LABEL") || !strcmp(search_type, "UUID"))) {