diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-12-01 09:31:07 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-12-01 09:31:07 +0200 |
commit | ab68421992b1a9d03685a8288f6bef401335394d (patch) | |
tree | e8af6e6cbeeb3fff36f2cda5acced6234f99d430 /build/rpmfc.c | |
parent | 73dec03ac143e7fc7eba82b2fbb8876f1b5aea2c (diff) | |
download | librpm-tizen-ab68421992b1a9d03685a8288f6bef401335394d.tar.gz librpm-tizen-ab68421992b1a9d03685a8288f6bef401335394d.tar.bz2 librpm-tizen-ab68421992b1a9d03685a8288f6bef401335394d.zip |
Eliminate unused dir argument to getOutputFrom()
Diffstat (limited to 'build/rpmfc.c')
-rw-r--r-- | build/rpmfc.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c index f3c06726d..39b64f4e1 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -167,14 +167,13 @@ static void sigpipe_finish(void) /** \ingroup rpmbuild * Return output from helper script. * @todo Use poll(2) rather than select(2), if available. - * @param dir directory to run in (or NULL) * @param argv program and arguments to run * @param writePtr bytes to feed to script on stdin (or NULL) * @param writeBytesLeft no. of bytes to feed to script on stdin * @param failNonZero is script failure an error? * @return buffered stdout from script, NULL on error */ -static StringBuf getOutputFrom(const char * dir, ARGV_t argv, +static StringBuf getOutputFrom(ARGV_t argv, const char * writePtr, size_t writeBytesLeft, int failNonZero) { @@ -205,12 +204,6 @@ static StringBuf getOutputFrom(const char * dir, ARGV_t argv, dup2(fromProg[1], STDOUT_FILENO); /* Make stdout the out pipe */ close(fromProg[1]); - if (dir && chdir(dir)) { - rpmlog(RPMLOG_ERR, _("Couldn't chdir to %s: %s\n"), - dir, strerror(errno)); - _exit(EXIT_FAILURE); - } - rpmlog(RPMLOG_DEBUG, "\texecv(%s) pid %d\n", argv[0], (unsigned)getpid()); @@ -362,7 +355,7 @@ int rpmfcExec(ARGV_const_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp, } /* Read output from exec'd helper. */ - sb = getOutputFrom(NULL, xav, buf_stdin, buf_stdin_len, failnonzero); + sb = getOutputFrom(xav, buf_stdin, buf_stdin_len, failnonzero); if (sb_stdoutp != NULL) { *sb_stdoutp = sb; |