Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
lvm2.631
display-skipped-prompt-in-silent-mode.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File display-skipped-prompt-in-silent-mode.patch of Package lvm2.631
From 11bedf1baf6dbc48c7abf9a14f8584d996d00a59 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Thu, 15 May 2014 11:58:49 +0200 Subject: display: print skipped prompt Git-repo: https://git.fedorahosted.org/git/lvm2.git Git-commit: 11bedf1baf6dbc48c7abf9a14f8584d996d00a59 (partial) Patch-filtered: code only, skipped WHATS_NEW and man page References: bnc#892444 Since decisions in the silent mode may not be always obvious, print skipped prompt with answer 'n'. Also document '-qq' behaviour (single -q only shuts logging, while -qq sets silent mode). --- lib/display/display.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/display/display.c b/lib/display/display.c index b808f25..3c47aa8 100644 --- a/lib/display/display.c +++ b/lib/display/display.c @@ -912,9 +912,6 @@ char yes_no_prompt(const char *prompt, . int c = 0, ret = 0; va_list ap; - if (silent_mode()) - return 'n'; - sigint_allow(); do { if (c == '\n' || !c) { @@ -922,6 +919,11 @@ char yes_no_prompt(const char *prompt, . vfprintf(stderr, prompt, ap); va_end(ap); fflush(stderr); + if (silent_mode()) { + fputc('n', stderr); + ret = 'n'; + break; + } ret = 0; } @@ -943,7 +945,6 @@ char yes_no_prompt(const char *prompt, . sigint_restore(); if (c != '\n') - fprintf(stderr, "\n"); - + fputc('\n', stderr); return ret; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor