summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-09-20 13:34:47 +0000
committerjbj <devnull@localhost>1999-09-20 13:34:47 +0000
commit6bdf51d7f3a40988812f3d5ea829ae2395e8e05a (patch)
tree7ad986b8c192204a597a3402c6dfbe9171be5d48 /lib
parentaa8b92fedffeed174157fee39090dcb78611ac5a (diff)
downloadlibrpm-tizen-6bdf51d7f3a40988812f3d5ea829ae2395e8e05a.tar.gz
librpm-tizen-6bdf51d7f3a40988812f3d5ea829ae2395e8e05a.tar.bz2
librpm-tizen-6bdf51d7f3a40988812f3d5ea829ae2395e8e05a.zip
Start experimental support for bzip2 payloads.
CVS patchset: 3309 CVS date: 1999/09/20 13:34:47
Diffstat (limited to 'lib')
-rw-r--r--lib/cpio.c10
-rw-r--r--lib/cpio.h9
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/cpio.c b/lib/cpio.c
index 8496c57a9..bb81a7a22 100644
--- a/lib/cpio.c
+++ b/lib/cpio.c
@@ -82,6 +82,11 @@ static inline off_t saferead(CFD_t *cfd, /*@out@*/void * vbuf, size_t amount)
case cpioIoTypeGzFd:
nb = gzdRead(cfd->cpioGzFd, buf, amount);
break;
+#if ENABLE_BZIP2_PAYLOAD
+ case cpioIoTypeBzFd:
+ nb = bzdRead(cfd->cpioBzFd, buf, amount);
+ break;
+#endif
}
if (nb <= 0)
return nb;
@@ -140,6 +145,11 @@ static inline off_t safewrite(CFD_t *cfd, const void * vbuf, size_t amount)
case cpioIoTypeGzFd:
nb = gzdWrite(cfd->cpioGzFd, buf, amount);
break;
+#if ENABLE_BZIP2_PAYLOAD
+ case cpioIoTypeBzFd:
+ nb = bzdWrite(cfd->cpioBzFd, buf, amount);
+ break;
+#endif
}
if (nb <= 0)
return nb;
diff --git a/lib/cpio.h b/lib/cpio.h
index 69f6ff610..057556ec5 100644
--- a/lib/cpio.h
+++ b/lib/cpio.h
@@ -69,13 +69,20 @@ typedef struct CFD {
#define cpioFp _cfdu._cfdu_fp
/*@owned@*/FD_t _cfdu_gzfd;
#define cpioGzFd _cfdu._cfdu_gzfd
+#if ENABLE_BZIP2_PAYLOAD
+ /*@owned@*/FD_t _cfdu_bzfd;
+#define cpioBzFd _cfdu._cfdu_bzfd
+#endif
} _cfdu;
int cpioPos;
enum cpioIoType {
cpioIoTypeDebug,
cpioIoTypeFd,
cpioIoTypeFp,
- cpioIoTypeGzFd
+ cpioIoTypeGzFd,
+#if ENABLE_BZIP2_PAYLOAD
+ cpioIoTypeBzFd,
+#endif
} cpioIoType;
} CFD_t;