The following commit has been merged in the master branch: commit ccb9d03ffd24c0e7319872bf190ce99dbb37b18e Author: Guillem Jover <guil...@debian.org> Date: Wed Jul 28 20:11:58 2010 +0200
libdpkg: Rename TarInfo to tar_entry diff --git a/lib/dpkg/tarfn.c b/lib/dpkg/tarfn.c index 635a816..0893d62 100644 --- a/lib/dpkg/tarfn.c +++ b/lib/dpkg/tarfn.c @@ -111,7 +111,7 @@ get_prefix_name(struct TarHeader *h) } static int -DecodeTarHeader(char *block, struct TarInfo *d) +DecodeTarHeader(char *block, struct tar_entry *d) { struct TarHeader *h = (struct TarHeader *)block; unsigned char *s = (unsigned char *)block; @@ -174,8 +174,8 @@ DecodeTarHeader(char *block, struct TarInfo *d) } struct symlinkList { - struct TarInfo h; struct symlinkList *next; + struct tar_entry h; }; int @@ -183,7 +183,7 @@ tar_extractor(void *ctx, const struct tar_operations *ops) { int status; char buffer[TARBLKSZ]; - struct TarInfo h; + struct tar_entry h; char *next_long_name, *next_long_link; char *bp; @@ -253,7 +253,7 @@ tar_extractor(void *ctx, const struct tar_operations *ops) break; case tar_filetype_symlink: symlink_node = m_malloc(sizeof(*symlink_node)); - memcpy(&symlink_node->h, &h, sizeof(struct TarInfo)); + memcpy(&symlink_node->h, &h, sizeof(struct tar_entry)); symlink_node->h.name = m_strdup(h.name); symlink_node->h.linkname = m_strdup(h.linkname); symlink_node->next = NULL; diff --git a/lib/dpkg/tarfn.h b/lib/dpkg/tarfn.h index c692abc..0401cb0 100644 --- a/lib/dpkg/tarfn.h +++ b/lib/dpkg/tarfn.h @@ -48,7 +48,7 @@ enum tar_filetype { tar_filetype_gnu_longname = 'L', }; -struct TarInfo { +struct tar_entry { enum tar_format format; /* Tar archive format. */ enum tar_filetype type; /* Regular, Directory, Special, Link */ char *name; /* File name */ @@ -62,7 +62,7 @@ struct TarInfo { }; typedef int (*tar_read_func)(void *ctx, char *buffer, int length); -typedef int (*tar_func)(void *ctx, struct TarInfo *h); +typedef int (*tar_func)(void *ctx, struct tar_entry *h); struct tar_operations { tar_read_func read; diff --git a/src/archives.c b/src/archives.c index 7389e29..31c5f0c 100644 --- a/src/archives.c +++ b/src/archives.c @@ -180,7 +180,7 @@ int tarfileread(void *ud, char *buf, int len) { } static void -tarfile_skip_one_forward(struct tarcontext *tc, struct TarInfo *ti) +tarfile_skip_one_forward(struct tarcontext *tc, struct tar_entry *ti) { size_t r; char databuf[TARBLKSZ]; @@ -230,7 +230,9 @@ does_replace(struct pkginfo *newpigp, struct pkginfoperfile *newpifp, return false; } -static void newtarobject_utime(const char *path, struct TarInfo *ti) { +static void +newtarobject_utime(const char *path, struct tar_entry *ti) +{ struct utimbuf utb; utb.actime= currenttime; utb.modtime = ti->mtime; @@ -238,7 +240,10 @@ static void newtarobject_utime(const char *path, struct TarInfo *ti) { ohshite(_("error setting timestamps of `%.255s'"), ti->name); } -static void newtarobject_allmodes(const char *path, struct TarInfo *ti, struct filestatoverride* statoverride) { +static void +newtarobject_allmodes(const char *path, struct tar_entry *ti, + struct filestatoverride *statoverride) +{ if (chown(path, statoverride ? statoverride->uid : ti->uid, statoverride ? statoverride->gid : ti->gid)) @@ -337,7 +342,7 @@ struct fileinlist *addfiletolist(struct tarcontext *tc, } static void -remove_file_from_list(struct tarcontext *tc, struct TarInfo *ti, +remove_file_from_list(struct tarcontext *tc, struct tar_entry *ti, struct fileinlist **oldnifd, struct fileinlist *nifd) { @@ -347,7 +352,7 @@ remove_file_from_list(struct tarcontext *tc, struct TarInfo *ti, } static bool -linktosameexistingdir(const struct TarInfo *ti, const char *fname, +linktosameexistingdir(const struct tar_entry *ti, const char *fname, struct varbuf *symlinkfn) { struct stat oldstab, newstab; @@ -392,7 +397,7 @@ linktosameexistingdir(const struct TarInfo *ti, const char *fname, } int -tarobject(void *ctx, struct TarInfo *ti) +tarobject(void *ctx, struct tar_entry *ti) { static struct varbuf conffderefn, hardlinkfn, symlinkfn; static int fd; diff --git a/src/archives.h b/src/archives.h index d08c3f1..9f47aa2 100644 --- a/src/archives.h +++ b/src/archives.h @@ -64,7 +64,7 @@ void ok_prermdeconfigure(int argc, void **argv); void setupfnamevbs(const char *filename); int unlinkorrmdir(const char *filename); -int tarobject(void *ctx, struct TarInfo *ti); +int tarobject(void *ctx, struct tar_entry *ti); int tarfileread(void *ud, char *buf, int len); void tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg); diff --git a/src/filters.c b/src/filters.c index 72687f7..3586d31 100644 --- a/src/filters.c +++ b/src/filters.c @@ -61,7 +61,7 @@ filter_add(const char *pattern, bool include) } bool -filter_should_skip(struct TarInfo *ti) +filter_should_skip(struct tar_entry *ti) { struct filter_node *f; bool skip = false; diff --git a/src/filters.h b/src/filters.h index 5d3dea0..b434cfa 100644 --- a/src/filters.h +++ b/src/filters.h @@ -30,7 +30,7 @@ DPKG_BEGIN_DECLS void filter_add(const char *glob, bool include); -bool filter_should_skip(struct TarInfo *ti); +bool filter_should_skip(struct tar_entry *ti); DPKG_END_DECLS -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org