summaryrefslogtreecommitdiff
path: root/query.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1996-09-01 16:54:43 +0000
committerewt <devnull@localhost>1996-09-01 16:54:43 +0000
commit99f690279a31ad5b529cbe73c90df457094cd129 (patch)
treee8b3ea9768f557cb2715ebd9dee8195af7d50d05 /query.c
parentac5a232084020d6551dbc626d25e67c12cb09cc4 (diff)
downloadrpm-99f690279a31ad5b529cbe73c90df457094cd129.tar.gz
rpm-99f690279a31ad5b529cbe73c90df457094cd129.tar.bz2
rpm-99f690279a31ad5b529cbe73c90df457094cd129.zip
added :fflags format
CVS patchset: 1013 CVS date: 1996/09/01 16:54:43
Diffstat (limited to 'query.c')
-rw-r--r--query.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/query.c b/query.c
index 6a524fbd2..e6a001af6 100644
--- a/query.c
+++ b/query.c
@@ -270,6 +270,15 @@ static char * handleFormat(Header h, char * chptr, int * cntptr,
tstruct = localtime(&dateint);
strftime(buf, sizeof(buf) - 1, "%c", tstruct);
printf(format, buf);
+ } else if (!strcmp(how, "fflags")) {
+ strcat(format, "s");
+ buf[0] = '\0';
+ anint = *(((int_32 *) p) + arrayNum);
+ if (anint & RPMFILE_DOC)
+ strcat(buf, "d");
+ if (anint & RPMFILE_CONFIG)
+ strcat(buf, "c");
+ printf(format, buf);
} else if (!strcmp(how, "perms") || !strcmp(how, "permissions")) {
strcat(format, "s");
printf(format, permsString(*(((int_32 *) p) + arrayNum)));