sfdisk: make --quiet really quiet
References: https://github.com/karelzak/util-linux/issues/268 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
d09c06baf4
commit
c809b20aa4
|
@ -1591,13 +1591,15 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
|
|||
sf->prompt = xstrdup(SFDISK_PROMPT);
|
||||
}
|
||||
|
||||
if (sf->prompt && (sf->interactive || !sf->quiet)) {
|
||||
#ifndef HAVE_LIBREADLINE
|
||||
if (sf->prompt)
|
||||
fputs(sf->prompt, stdout);
|
||||
#else
|
||||
if (!sf->interactive && sf->prompt)
|
||||
fputs(sf->prompt, stdout);
|
||||
if (!sf->interactive)
|
||||
fputs(sf->prompt, stdout);
|
||||
#endif
|
||||
}
|
||||
|
||||
rc = fdisk_script_read_line(dp, stdin, buf, sizeof(buf));
|
||||
if (rc < 0) {
|
||||
DBG(PARSE, ul_debug("script parsing failed, trying sfdisk specific commands"));
|
||||
|
|
Loading…
Reference in New Issue