diff options
author | jbj <devnull@localhost> | 2001-10-19 13:51:20 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-10-19 13:51:20 +0000 |
commit | e2a842407516209b3447997d19879848d074c3d6 (patch) | |
tree | 0c983b1a72658f12cac08ddbddd6633b4d67c963 /rpmio/rpmio.c | |
parent | ca1d809cb1d9125b7029e2d5d378d2a04955f178 (diff) | |
download | librpm-tizen-e2a842407516209b3447997d19879848d074c3d6.tar.gz librpm-tizen-e2a842407516209b3447997d19879848d074c3d6.tar.bz2 librpm-tizen-e2a842407516209b3447997d19879848d074c3d6.zip |
Start ripping gpg/pgp on signature verify paths.
CVS patchset: 5123
CVS date: 2001/10/19 13:51:20
Diffstat (limited to 'rpmio/rpmio.c')
-rw-r--r-- | rpmio/rpmio.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 36478fc33..169641972 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -2155,7 +2155,10 @@ static int gzdFlush(FD_t fd) /*@globals fileSystem @*/ /*@modifies fileSystem @*/ { - return gzflush(gzdFileno(fd), Z_SYNC_FLUSH); /* XXX W2DO? */ + gzFile *gzfile; + gzfile = gzdFileno(fd); + if (gzfile == NULL) return -2; + return gzflush(gzfile, Z_SYNC_FLUSH); /* XXX W2DO? */ } /*@=globuse@*/ @@ -2170,10 +2173,13 @@ static ssize_t gzdRead(void * cookie, /*@out@*/ char * buf, size_t count) ssize_t rc; if (fd == NULL || fd->bytesRemain == 0) return 0; /* XXX simulate EOF */ + gzfile = gzdFileno(fd); + if (gzfile == NULL) return -2; /* XXX can't happen */ + fdstat_enter(fd, FDSTAT_READ); + /*@-compdef@*/ /* LCL: *buf is undefined */ rc = gzread(gzfile, buf, count); - /*@-compdef@*/ /*@-modfilesys@*/ DBGIO(fd, (stderr, "==>\tgzdRead(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)count, (unsigned long)rc, fdbg(fd))); /*@=modfilesys@*/ @@ -2208,6 +2214,8 @@ static ssize_t gzdWrite(void * cookie, const char * buf, size_t count) if (fd->digest && count > 0) (void) rpmDigestUpdate(fd->digest, buf, count); gzfile = gzdFileno(fd); + if (gzfile == NULL) return -2; /* XXX can't happen */ + fdstat_enter(fd, FDSTAT_WRITE); rc = gzwrite(gzfile, (void *)buf, count); /*@-modfilesys@*/ @@ -2243,7 +2251,10 @@ static inline int gzdSeek(void * cookie, _libio_pos_t pos, int whence) if (fd == NULL) return -2; assert(fd->bytesRemain == -1); /* XXX FIXME */ + gzfile = gzdFileno(fd); + if (gzfile == NULL) return -2; /* XXX can't happen */ + fdstat_enter(fd, FDSTAT_SEEK); rc = gzseek(gzfile, p, whence); /*@-modfilesys@*/ @@ -2274,8 +2285,8 @@ static int gzdClose( /*@only@*/ void * cookie) int rc; gzfile = gzdFileno(fd); + if (gzfile == NULL) return -2; /* XXX can't happen */ - if (gzfile == NULL) return -2; fdstat_enter(fd, FDSTAT_CLOSE); rc = gzclose(gzfile); |