Commit graph

8 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 601185b43d Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.

When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.

Also, simplify things here and there.
2014-08-03 21:46:07 -04:00
Thomas Hindoe Paaboel Andersen 248fab742d virt: make Virtualization an anonymous enum
This makes llvm happy when we assign an error code to the variable.
2014-02-24 13:26:44 +01:00
Lennart Poettering eb9da376d7 clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts.
2013-11-06 18:28:39 +01:00
Lennart Poettering 0fb533a533 virt: move caching of virtualization check results into detect_vm() and detect_container()
After all, we ended up calling detect_container() more often than
detect_virtualization(), hence the former one should cache the results,
since the latter is only a wrapper around the former.
2013-10-31 16:24:14 +01:00
Lennart Poettering bc2708414b build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2013-01-04 23:26:21 +01:00
Kay Sievers 8c32f0143b systemd-detect-virt: fix "option '--quiet' requires an argument"
https://bugs.freedesktop.org/show_bug.cgi?id=50671
2012-06-04 12:39:22 +02:00
Kay Sievers 018ef268b1 silence a bunch of gcc warnings 2012-04-17 18:42:09 +02:00
Kay Sievers dce818b390 move all tools to subdirs 2012-04-12 17:54:42 +02:00
Renamed from src/detect-virt.c (Browse further)