projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4abfb4c
)
Add -h/--help to rpm2cpio (ticket #63)
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 18 Jun 2009 11:52:45 +0000
(14:52 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 18 Jun 2009 11:52:45 +0000
(14:52 +0300)
- patch originally from Debian, with slight adjustments to indentation
rpm2cpio.c
patch
|
blob
|
history
diff --git
a/rpm2cpio.c
b/rpm2cpio.c
index
eabefa1
..
e098385
100644
(file)
--- a/
rpm2cpio.c
+++ b/
rpm2cpio.c
@@
-23,8
+23,13
@@
int main(int argc, char *argv[])
setprogname(argv[0]); /* Retrofit glibc __progname */
if (argc == 1)
fdi = fdDup(STDIN_FILENO);
- else
+ else {
+ if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0) {
+ fprintf(stderr, "Usage: rpm2cpio file.rpm\n");
+ exit(EXIT_FAILURE);
+ }
fdi = Fopen(argv[1], "r.ufdio");
+ }
if (Ferror(fdi)) {
fprintf(stderr, "%s: %s: %s\n", argv[0],