diff options
author | jbj <devnull@localhost> | 2003-01-28 17:17:26 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-01-28 17:17:26 +0000 |
commit | c63f257a7ebd1d41a3caf38172251bdb2e6c0b20 (patch) | |
tree | b915754e18cb70148686f0c3f75d4f7bfcf9121c /rpmio/rpmlog.c | |
parent | b4352eaa31f458d0eee5bf9b319982ded7fb246f (diff) | |
download | librpm-tizen-c63f257a7ebd1d41a3caf38172251bdb2e6c0b20.tar.gz librpm-tizen-c63f257a7ebd1d41a3caf38172251bdb2e6c0b20.tar.bz2 librpm-tizen-c63f257a7ebd1d41a3caf38172251bdb2e6c0b20.zip |
- fix: clean relocation path for --prefix=/.
- python: permit stdout/stderr to be remapped to install.log.
CVS patchset: 6031
CVS date: 2003/01/28 17:17:26
Diffstat (limited to 'rpmio/rpmlog.c')
-rw-r--r-- | rpmio/rpmlog.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/rpmio/rpmlog.c b/rpmio/rpmlog.c index 13abea8c6..4d8e8d9c0 100644 --- a/rpmio/rpmlog.c +++ b/rpmio/rpmlog.c @@ -124,6 +124,18 @@ rpmlogCallback rpmlogSetCallback(rpmlogCallback cb) return ocb; } +/*@unchecked@*/ /*@null@*/ +static FILE * _stdlog = NULL; + +FILE * rpmlogSetFile(FILE * fp) + /*@globals _stdlog @*/ + /*@modifies _stdlog @*/ +{ + FILE * ofp = _stdlog; + _stdlog = fp; + return ofp; +} + /*@-readonlytrans@*/ /* FIX: double indirection. */ /*@observer@*/ /*@unchecked@*/ static char *rpmlogMsgPrefix[] = { @@ -158,7 +170,7 @@ static void vrpmlog (unsigned code, const char *fmt, va_list ap) /*@unused@*/ unsigned fac = RPMLOG_FAC(code); char *msgbuf, *msg; int msgnb = BUFSIZ, nb; - FILE * msgout = stderr; + FILE * msgout = (_stdlog ? _stdlog : stderr); if ((mask & rpmlogMask) == 0) return; @@ -216,7 +228,7 @@ static void vrpmlog (unsigned code, const char *fmt, va_list ap) switch (pri) { case RPMLOG_INFO: case RPMLOG_NOTICE: - msgout = stdout; + msgout = (_stdlog ? _stdlog : stdout); break; case RPMLOG_EMERG: |