diff options
author | 2016-01-11 23:31:27 +0000 | |
---|---|---|
committer | 2016-01-11 23:31:27 +0000 | |
commit | cf1921b209616fdde3bde1307be6eaefe55ac0d1 (patch) | |
tree | 7322a09be7c6a63a6f5157eeca835143db5b05e3 | |
parent | Mention sdhc* at acpi?. (diff) | |
download | wireguard-openbsd-cf1921b209616fdde3bde1307be6eaefe55ac0d1.tar.xz wireguard-openbsd-cf1921b209616fdde3bde1307be6eaefe55ac0d1.zip |
open_pathname_as_media() simply called open_file_as_media() which
takes the same parameters and returns the same value. Nuke
open_pathname_as_media() and call open_file_as_media() directly.
Nothing else from pathname.[ch] is used so remove them from build
in preparation for moving them to the attic.
ok deraadt@
-rw-r--r-- | sbin/pdisk/Makefile | 4 | ||||
-rw-r--r-- | sbin/pdisk/dump.c | 3 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 10 | ||||
-rw-r--r-- | sbin/pdisk/pdisk.c | 6 | ||||
-rw-r--r-- | sbin/pdisk/validate.c | 6 |
5 files changed, 14 insertions, 15 deletions
diff --git a/sbin/pdisk/Makefile b/sbin/pdisk/Makefile index 557e4238ebb..b277a1e7d8b 100644 --- a/sbin/pdisk/Makefile +++ b/sbin/pdisk/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.13 2016/01/11 18:43:06 krw Exp $ +# $Id: Makefile,v 1.14 2016/01/11 23:31:27 krw Exp $ .if ${MACHINE} == "macppc" PROG= pdisk @@ -7,7 +7,7 @@ DPADD= ${LIBUTIL} CFLAGS+=-Wall SRCS= bitfield.c convert.c deblock_media.c dump.c errors.c \ - file_media.c hfs_misc.c io.c media.c partition_map.c pathname.c \ + file_media.c hfs_misc.c io.c media.c partition_map.c \ pdisk.c validate.c .else diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c index d5cb14b41de..0fa6ef0de5c 100644 --- a/sbin/pdisk/dump.c +++ b/sbin/pdisk/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.12 2016/01/11 07:54:07 jasper Exp $ */ +/* $OpenBSD: dump.c,v 1.13 2016/01/11 23:31:27 krw Exp $ */ // // dump.c - dumping partition maps @@ -41,7 +41,6 @@ #include <errno.h> #include "dump.h" -#include "pathname.h" #include "io.h" #include "errors.h" diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index 356461d4441..a1e98ca063f 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.12 2016/01/11 18:43:06 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.13 2016/01/11 23:31:27 krw Exp $ */ // // partition_map.c - partition map routines @@ -52,12 +52,12 @@ #include <errno.h> #include "partition_map.h" -#include "pathname.h" #include "hfs_misc.h" #include "deblock_media.h" #include "io.h" #include "convert.h" #include "errors.h" +#include "file_media.h" // @@ -130,9 +130,9 @@ open_partition_map(char *name, int *valid_file, int ask_logical_size) int writable; long size; - m = open_pathname_as_media(name, (rflag)?O_RDONLY:O_RDWR); + m = open_file_as_media(name, (rflag)?O_RDONLY:O_RDWR); if (m == 0) { - m = open_pathname_as_media(name, O_RDONLY); + m = open_file_as_media(name, O_RDONLY); if (m == 0) { error(errno, "can't open file '%s'", name); *valid_file = 0; @@ -431,7 +431,7 @@ create_partition_map(char *name, partition_map_header *oldmap) long size; unsigned long multiple; - m = open_pathname_as_media(name, (rflag)?O_RDONLY:O_RDWR); + m = open_file_as_media(name, (rflag)?O_RDONLY:O_RDWR); if (m == 0) { error(errno, "can't open file '%s' for %sing", name, (rflag)?"read":"writ"); diff --git a/sbin/pdisk/pdisk.c b/sbin/pdisk/pdisk.c index 28301152c04..4283dfb5687 100644 --- a/sbin/pdisk/pdisk.c +++ b/sbin/pdisk/pdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdisk.c,v 1.22 2016/01/11 18:43:06 krw Exp $ */ +/* $OpenBSD: pdisk.c,v 1.23 2016/01/11 23:31:27 krw Exp $ */ // // pdisk - an editor for Apple format partition tables @@ -46,11 +46,11 @@ #include "pdisk.h" #include "io.h" #include "partition_map.h" -#include "pathname.h" #include "hfs_misc.h" #include "errors.h" #include "dump.h" #include "validate.h" +#include "file_media.h" // @@ -906,7 +906,7 @@ do_display_block(partition_map_header *map, char *alt_name) return; } } - m = open_pathname_as_media(name, O_RDONLY); + m = open_file_as_media(name, O_RDONLY); if (m == 0) { error(errno, "can't open file '%s'", name); free(name); diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c index e65590b7cb8..58d7a663276 100644 --- a/sbin/pdisk/validate.c +++ b/sbin/pdisk/validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: validate.c,v 1.8 2016/01/11 07:57:54 jasper Exp $ */ +/* $OpenBSD: validate.c,v 1.9 2016/01/11 23:31:27 krw Exp $ */ // // validate.c - @@ -39,10 +39,10 @@ #include "validate.h" #include "deblock_media.h" -#include "pathname.h" #include "convert.h" #include "io.h" #include "errors.h" +#include "file_media.h" // @@ -347,7 +347,7 @@ validate_map(partition_map_header *map) bad_input("Bad name"); return; } - the_media = open_pathname_as_media(name, O_RDONLY); + the_media = open_file_as_media(name, O_RDONLY); if (the_media == 0) { error(errno, "can't open file '%s'", name); free(name); |