exit(EXIT_SUCCESS);
}
-static void __attribute__ ((__noreturn__)) print_version(void)
-{
- printf(UTIL_LINUX_VERSION);
- exit(EXIT_SUCCESS);
-}
-
int main(int argc, char **argv)
{
char *device, *volume, *fsname;
errtryhelp(EXIT_FAILURE);
}
if (argc == 2 && !strcmp(argv[1], "-V"))
- print_version();
+ print_version(EXIT_SUCCESS);
volume = fsname = " "; /* is there a default? */
inodes = 0;
break;
case VERSION_OPTION:
- print_version();
+ print_version(EXIT_SUCCESS);
case 'h':
usage();
default:
exit(EXIT_SUCCESS);
}
-static void __attribute__ ((__noreturn__)) print_version(void)
-{
- printf(UTIL_LINUX_VERSION);
- exit(EXIT_SUCCESS);
-}
-
int main(int argc, char **argv)
{
char *progname; /* name of executable to be called */
atexit(close_stdout);
if (argc == 2 && !strcmp(argv[1], "-V"))
- print_version();
+ print_version(EXIT_SUCCESS);
/* Check commandline options. */
opterr = 0;
case 'h':
usage();
case VERSION_OPTION:
- print_version();
+ print_version(EXIT_SUCCESS);
default:
optind--;
more = 1;
raw_chars:1;
};
-static void print_version(FILE *out)
-{
- fprintf(out, _("%s from %s (libblkid %s, %s)\n"),
- program_invocation_short_name, PACKAGE_STRING,
- LIBBLKID_VERSION, LIBBLKID_DATE);
-}
-
static void __attribute__((__noreturn__)) usage(void)
{
FILE *out = stdout;
break;
case 'V':
case 'v':
- print_version(stdout);
+ fprintf(stdout, _("%s from %s (libblkid %s, %s)\n"),
+ program_invocation_short_name, PACKAGE_STRING,
+ LIBBLKID_VERSION, LIBBLKID_DATE);
err = 0;
goto exit;
case 'w':
errx(MNT_EX_USAGE, _("only root can do that"));
}
-static void __attribute__((__noreturn__)) print_version(void)
+static void __attribute__((__noreturn__)) mount_print_version(void)
{
const char *ver = NULL;
const char **features = NULL, **p;
mnt_context_enable_verbose(cxt, TRUE);
break;
case 'V':
- print_version();
+ mount_print_version();
break;
case 'w':
append_option(cxt, "rw");
}
-static void __attribute__((__noreturn__)) print_version(void)
+static void __attribute__((__noreturn__)) umount_print_version(void)
{
const char *ver = NULL;
const char **features = NULL, **p;
mnt_context_enable_verbose(cxt, TRUE);
break;
case 'V':
- print_version();
+ umount_print_version();
break;
case 'N':
{