diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-06-27 18:38:13 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-06-27 18:38:13 +0000 |
commit | 7cfb61a9b9d4d229afc86b347be4b4f696159b61 (patch) | |
tree | 028a85142b5dcf820d4a79533ebb325b81e54117 /lib/libarchive/archive_read_extract.c | |
parent | 34ed55636f92a39a90a92eadbea5f89e0b642b23 (diff) | |
download | FreeBSD-src-7cfb61a9b9d4d229afc86b347be4b4f696159b61.zip FreeBSD-src-7cfb61a9b9d4d229afc86b347be4b4f696159b61.tar.gz |
Clean up some consistent confusion between "dev" and "rdev."
Mostly, these were being used correctly even though a lot of
variables and function names were mis-named.
In the process, I found and fixed a couple of latent bugs and
added a guard against adding an archive to itself.
Diffstat (limited to 'lib/libarchive/archive_read_extract.c')
-rw-r--r-- | lib/libarchive/archive_read_extract.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libarchive/archive_read_extract.c b/lib/libarchive/archive_read_extract.c index c473980..1257a8e 100644 --- a/lib/libarchive/archive_read_extract.c +++ b/lib/libarchive/archive_read_extract.c @@ -625,13 +625,13 @@ archive_read_extract_device(struct archive *a, struct archive_entry *entry, unlink(archive_entry_pathname(entry)); r = mknod(archive_entry_pathname(entry), mode, - archive_entry_stat(entry)->st_rdev); + archive_entry_rdev(entry)); /* Might be a non-existent parent dir; try fixing that. */ if (r != 0 && errno == ENOENT) { mkdirpath(a, archive_entry_pathname(entry)); r = mknod(archive_entry_pathname(entry), mode, - archive_entry_stat(entry)->st_rdev); + archive_entry_rdev(entry)); } if (r != 0) { @@ -654,7 +654,7 @@ archive_read_extract_char_device(struct archive *a, { mode_t mode; - mode = (archive_entry_stat(entry)->st_mode & ~S_IFMT) | S_IFCHR; + mode = (archive_entry_mode(entry) & ~S_IFMT) | S_IFCHR; return (archive_read_extract_device(a, entry, flags, mode)); } @@ -664,7 +664,7 @@ archive_read_extract_block_device(struct archive *a, { mode_t mode; - mode = (archive_entry_stat(entry)->st_mode & ~S_IFMT) | S_IFBLK; + mode = (archive_entry_mode(entry) & ~S_IFMT) | S_IFBLK; return (archive_read_extract_device(a, entry, flags, mode)); } |