summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install.c8
-rw-r--r--install.h3
2 files changed, 6 insertions, 5 deletions
diff --git a/install.c b/install.c
index aa68f6b82..bae49d3d2 100644
--- a/install.c
+++ b/install.c
@@ -41,7 +41,7 @@ static void printPercent(const unsigned long amount, const unsigned long total)
fflush(stdout);
}
-void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags) {
+int doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags) {
rpmdb db;
int fd;
int mode, rc;
@@ -79,14 +79,14 @@ void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags)
if (fd < 0) {
fprintf(stderr, "error: ftp of %s failed - %s\n", arg,
ftpStrerror(fd));
- return;
+ return 1;
}
} else {
fd = open(arg, O_RDONLY);
if (fd < 0) {
rpmdbClose(db);
fprintf(stderr, "error: cannot open %s\n", arg);
- return;
+ return 1;
}
}
@@ -110,6 +110,8 @@ void doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags)
close(fd);
rpmdbClose(db);
+
+ return rc;
}
void doUninstall(char * prefix, char * arg, int test, int uninstallFlags) {
diff --git a/install.h b/install.h
index 0588b73c8..efc8edf3d 100644
--- a/install.h
+++ b/install.h
@@ -4,8 +4,7 @@
#define RPMINSTALL_PERCENT 1
#define RPMINSTALL_HASH 2
-void doInstall(char * prefix, char * arg, int installFlags,
- int interfaceFlags);
+int doInstall(char * prefix, char * arg, int installFlags, int interfaceFlags);
int doSourceInstall(char * prefix, char * arg, char ** specFile);
void doUninstall(char * prefix, char * arg, int test, int uninstallFlags);