diff options
author | Judd Vinet <judd@archlinux.org> | 2005-12-21 00:58:27 +0100 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-12-21 00:58:27 +0100 |
commit | 953e7e5d3eea5d4562a8b4cf2cb18d4a71a96ff9 (patch) | |
tree | 7d3888775cec0670495fc6f3d4e34805bf90f1b9 | |
parent | 9a7190dfff42e090ebb540ca325007925d42e481 (diff) | |
download | pacman-953e7e5d3eea5d4562a8b4cf2cb18d4a71a96ff9.tar.gz pacman-953e7e5d3eea5d4562a8b4cf2cb18d4a71a96ff9.tar.xz |
VMiklos: --noconfirm fix
-rw-r--r-- | src/pacman/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index cda555ab..0114068c 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -36,8 +36,11 @@ /* pacman */ #include "util.h" +#include "list.h" +#include "conf.h" extern int maxcols; +extern config_t *config; /* does the same thing as 'mkdir -p' */ int makepath(char *path) @@ -192,6 +195,8 @@ int yesno(char *fmt, ...) char response[32]; va_list args; + if(!config->noconfirm) + { va_start(args, fmt); vprintf(fmt, args); va_end(args); @@ -217,6 +222,9 @@ int yesno(char *fmt, ...) } } return(0); + } else { + return(1); + } } /* match a string against a regular expression */ |