diff options
author | jbj <devnull@localhost> | 1998-11-18 21:41:05 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1998-11-18 21:41:05 +0000 |
commit | 2578b7fc8451f06f83640b448bda098e295447cb (patch) | |
tree | 5e2aca0b793a070ee6db89e5aa2ddee3e68ccc5d /lib/rpmlead.c | |
parent | 9e52926682d6df396086c32c9c86a81212441775 (diff) | |
download | librpm-tizen-2578b7fc8451f06f83640b448bda098e295447cb.tar.gz librpm-tizen-2578b7fc8451f06f83640b448bda098e295447cb.tar.bz2 librpm-tizen-2578b7fc8451f06f83640b448bda098e295447cb.zip |
implement abstract fd type almost everywhere.
CVS patchset: 2542
CVS date: 1998/11/18 21:41:05
Diffstat (limited to 'lib/rpmlead.c')
-rw-r--r-- | lib/rpmlead.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/rpmlead.c b/lib/rpmlead.c index c8d62c0ed..a858ebfca 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -9,11 +9,10 @@ #include "rpmlib.h" #include "rpmlead.h" -#include "tread.h" /* The lead needs to be 8 byte aligned */ -int writeLead(int fd, struct rpmlead *lead) +int writeLead(FD_t fd, struct rpmlead *lead) { struct rpmlead l; @@ -29,14 +28,14 @@ int writeLead(int fd, struct rpmlead *lead) l.osnum = htons(l.osnum); l.signature_type = htons(l.signature_type); - if (write(fd, &l, sizeof(l)) < 0) { + if (fdWrite(fd, &l, sizeof(l)) < 0) { return 1; } return 0; } -int readLead(int fd, struct rpmlead *lead) +int readLead(FD_t fd, struct rpmlead *lead) { if (timedRead(fd, lead, sizeof(*lead)) != sizeof(*lead)) { rpmError(RPMERR_READERROR, _("read failed: %s (%d)"), strerror(errno), |