From a783f3fbf1425fc9b8815a2ab658aa6530ce0c23 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sun, 10 May 2009 22:41:29 +0200 Subject: Introduce -Qlq With --quiet flag, -Ql doesn't print the package name, just lists the files. I made --quiet documentation up-to-date (I also added -Sgq/-Qgq). Signed-off-by: Nagy Gabor Signed-off-by: Dan McGee --- src/pacman/package.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/pacman/package.c') diff --git a/src/pacman/package.c b/src/pacman/package.c index b23c577f..da2feb51 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -205,7 +205,7 @@ void dump_pkg_backups(pmpkg_t *pkg) /* List all files contained in a package */ -void dump_pkg_files(pmpkg_t *pkg) +void dump_pkg_files(pmpkg_t *pkg, int quiet) { const char *pkgname, *root, *filestr; alpm_list_t *i, *pkgfiles; @@ -216,7 +216,11 @@ void dump_pkg_files(pmpkg_t *pkg) for(i = pkgfiles; i; i = alpm_list_next(i)) { filestr = alpm_list_getdata(i); - fprintf(stdout, "%s %s%s\n", pkgname, root, filestr); + if(!quiet){ + fprintf(stdout, "%s %s%s\n", pkgname, root, filestr); + } else { + fprintf(stdout, "%s%s\n", root, filestr); + } } fflush(stdout); -- cgit v1.2.3