diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-02-26 20:53:38 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-02-26 20:53:38 +0200 |
commit | edc6b13d19d832ec56b63007ccc84a0f43cf2629 (patch) | |
tree | 40ec111645cdb8e20a40cb4b153e743d0c0b63d7 | |
parent | 41ebd1cd50c780c247877bf9174aacdd55ca4923 (diff) | |
download | rpm-edc6b13d19d832ec56b63007ccc84a0f43cf2629.tar.gz rpm-edc6b13d19d832ec56b63007ccc84a0f43cf2629.tar.bz2 rpm-edc6b13d19d832ec56b63007ccc84a0f43cf2629.zip |
Remove the last remains of unused and unnecesary rpmio rpc vectors
-rw-r--r-- | rpmio/rpmio.c | 10 | ||||
-rw-r--r-- | rpmio/rpmio_internal.h | 44 | ||||
-rw-r--r-- | rpmio/tufdio.c | 42 |
3 files changed, 7 insertions, 89 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index 5ef0a36b3..f23be670b 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -366,7 +366,7 @@ DBGIO(fd, (stderr, "==>\tfdOpen(\"%s\",%x,0%o) %s\n", path, (unsigned)flags, (un static struct FDIO_s fdio_s = { fdRead, fdWrite, fdSeek, fdClose, fdLink, fdFree, fdNew, fdFileno, - fdOpen, NULL, fdGetFp, NULL, mkdir, chdir, rmdir, rename, unlink + fdOpen, NULL, fdGetFp, NULL }; FDIO_t fdio = &fdio_s ; @@ -815,7 +815,7 @@ DBGIO(fd, (stderr, "==>\tufdOpen(\"%s\",%x,0%o) %s\n", url, (unsigned)flags, (un static struct FDIO_s ufdio_s = { ufdRead, ufdWrite, ufdSeek, ufdClose, fdLink, fdFree, fdNew, fdFileno, - ufdOpen, NULL, fdGetFp, NULL, mkdir, chdir, rmdir, rename, unlink + ufdOpen, NULL, fdGetFp, NULL }; FDIO_t ufdio = &ufdio_s ; @@ -1021,7 +1021,7 @@ DBGIO(fd, (stderr, "==>\tgzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, f static struct FDIO_s gzdio_s = { gzdRead, gzdWrite, gzdSeek, gzdClose, fdLink, fdFree, fdNew, fdFileno, - NULL, gzdOpen, gzdFileno, gzdFlush, NULL, NULL, NULL, NULL, NULL + NULL, gzdOpen, gzdFileno, gzdFlush }; FDIO_t gzdio = &gzdio_s ; @@ -1184,7 +1184,7 @@ DBGIO(fd, (stderr, "==>\tbzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, f static struct FDIO_s bzdio_s = { bzdRead, bzdWrite, bzdSeek, bzdClose, fdLink, fdFree, fdNew, fdFileno, - NULL, bzdOpen, bzdFileno, bzdFlush, NULL, NULL, NULL, NULL, NULL + NULL, bzdOpen, bzdFileno, bzdFlush }; FDIO_t bzdio = &bzdio_s ; @@ -1689,6 +1689,6 @@ exit: static struct FDIO_s fpio_s = { ufdRead, ufdWrite, fdSeek, ufdClose, fdLink, fdFree, fdNew, fdFileno, - ufdOpen, NULL, fdGetFp, NULL, mkdir, chdir, rmdir, rename, unlink + ufdOpen, NULL, fdGetFp, NULL }; FDIO_t fpio = &fpio_s ; diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h index 753876b27..9f67a7a61 100644 --- a/rpmio/rpmio_internal.h +++ b/rpmio/rpmio_internal.h @@ -126,44 +126,6 @@ typedef void * (*fdio_ffileno_function_t) (FD_t fd); */ typedef int (*fdio_fflush_function_t) (FD_t fd); - -/** \ingroup rpmrpc - * \name RPMRPC Vectors. - */ - -/** - */ -typedef int (*fdio_mkdir_function_t) (const char * path, mode_t mode); - -/** - */ -typedef int (*fdio_chdir_function_t) (const char * path); - -/** - */ -typedef int (*fdio_rmdir_function_t) (const char * path); - -/** - */ -typedef int (*fdio_rename_function_t) (const char * oldpath, const char * newpath); - -/** - */ -typedef int (*fdio_unlink_function_t) (const char * path); - -/** - */ -typedef int (*fdio_stat_function_t) (const char * path, struct stat * st); - -/** - */ -typedef int (*fdio_lstat_function_t) (const char * path, struct stat * st); - -/** - */ -typedef int (*fdio_access_function_t) (const char * path, int amode); - - /** \ingroup rpmio */ struct FDIO_s { @@ -181,12 +143,6 @@ struct FDIO_s { fdio_fopen_function_t _fopen; fdio_ffileno_function_t _ffileno; fdio_fflush_function_t _fflush; - - fdio_mkdir_function_t _mkdir; - fdio_chdir_function_t _chdir; - fdio_rmdir_function_t _rmdir; - fdio_rename_function_t _rename; - fdio_unlink_function_t _unlink; }; /** diff --git a/rpmio/tufdio.c b/rpmio/tufdio.c index b88a7469d..19572cdfe 100644 --- a/rpmio/tufdio.c +++ b/rpmio/tufdio.c @@ -8,7 +8,7 @@ #include <err.h> #include <rpm/rpmurl.h> -#include "rpmio/rpmio_internal.h" +#include <rpm/rpmio.h> #include "debug.h" @@ -69,7 +69,7 @@ static int doFIO(const char *ofn, const char *rfmode, const char *wfmode) warn("Compare: write(%s) \"%s\" != read(%s) \"%s\" for %s\n", wfmode, ofn, rfmode, buf, ofn); else rc = 0; - if (ufdio->_unlink(ofn) != 0) + if (unlink(ofn) != 0) warn("Unlink: write(%s) read(%s) for %s\n", wfmode, rfmode, ofn); return rc; } @@ -95,46 +95,8 @@ static int doDir(const char *url) const char * odn = xstrconcat(url, tmpdir, mktemp(DIO_XXXXXX), NULL); const char * ndn = xstrconcat(url, tmpdir, mktemp(DIO_XXXXXX), NULL); -fprintf(stderr, "*** Rename #1 %s -> %s fail\n", ndn, odn); - if (!ufdio->_rename(ndn, odn)) - err(1, "Rename: dir !exists %s !exists %s fail\n", ndn, odn); -fprintf(stderr, "*** Chdir #1 %s fail\n", odn); - if (!ufdio->_chdir(odn)) err(1, "Chdir: !exists %s fail\n", odn); - -fprintf(stderr, "*** Mkdir #1 %s\n", odn); - if (ufdio->_mkdir(odn, 0755)) err(1, "Mkdir: !exists %s\n", odn); -fprintf(stderr, "*** Mkdir %s fail\n", odn); - if (!ufdio->_mkdir(odn, 0755)) err(1, "Mkdir: exists %s fail\n", odn); - -fprintf(stderr, "*** Chdir #2 %s\n", odn); - if (ufdio->_chdir(odn)) err(1, "Chdir: exists %s\n", odn); - -fprintf(stderr, "*** Rename #2 %s -> %s fail\n", ndn, odn); - if (!ufdio->_rename(ndn, odn)) - err(1, "Rename: dir !exists %s exists %s fail\n", ndn, odn); -fprintf(stderr, "*** Rename #3 %s -> %s\n", odn, ndn); - if (ufdio->_rename(odn, ndn)) - err(1, "Rename: dir exists %s !exists %s\n", odn, ndn); - -fprintf(stderr, "*** Mkdir #2 %s\n", ndn); - if (ufdio->_mkdir(odn, 0755)) err(1, "Mkdir: #2 !exists %s\n", odn); - -fprintf(stderr, "*** Rename #4 %s -> %s fail\n", odn, ndn); - if (!ufdio->_rename(odn, ndn)) - err(1, "Rename: dir exists %s exists %s fail\n", odn, ndn); - doFile(url, odn, ndn); -fprintf(stderr, "*** Rmdir #1 %s\n", odn); - if (ufdio->_rmdir(odn)) err(1, "Rmdir: exists %s\n", odn); -fprintf(stderr, "*** Rmdir #1 %s fail\n", odn); - if (!ufdio->_rmdir(odn)) err(1, "Rmdir: !exists %s fail\n", odn); - -fprintf(stderr, "*** Rmdir #3 %s\n", ndn); - if (ufdio->_rmdir(ndn)) err(1, "Rmdir: exists %s\n", ndn); -fprintf(stderr, "*** Rmdir #4 %s fail\n", ndn); - if (!ufdio->_rmdir(ndn)) err(1, "Rmdir: !exists %s fail\n", ndn); - return 0; } |