diff options
author | Ruediger Meier | 2016-03-22 12:14:45 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-03-22 14:13:33 +0100 |
commit | 9508e2972b1fdfca81e95ad7c2310991695009b5 (patch) | |
tree | 4b67f11873f3226ac3e6243f28f3cc7c5255676e /sys-utils | |
parent | build-sys: ignore vim .swp files (diff) | |
download | kernel-qcow2-util-linux-9508e2972b1fdfca81e95ad7c2310991695009b5.tar.gz kernel-qcow2-util-linux-9508e2972b1fdfca81e95ad7c2310991695009b5.tar.xz kernel-qcow2-util-linux-9508e2972b1fdfca81e95ad7c2310991695009b5.zip |
setarch: add "exec" message to --verbose
Also we don't need fflush() in non-verbose case.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/setarch.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index b5e401c81..cf29cf770 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -391,8 +391,11 @@ int main(int argc, char *argv[]) if (set_arch(arch, options, 0)) err(EXIT_FAILURE, _("failed to set personality to %s"), arch); - /* flush all output streams before exec */ - fflush(NULL); + if (verbose) { + printf(_("Execute command `%s'.\n"), argc ? argv[0] : "/bin/sh"); + /* flush all output streams before exec */ + fflush(NULL); + } if (!argc) { execl("/bin/sh", "-sh", NULL); |