diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-08-28 23:39:41 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-08-28 23:39:41 +0200 |
commit | 2603474ff9be2418900581da1af5cccc9f13cae1 (patch) | |
tree | 783c89e1baf6718b8207fb340f5ac143d86d6788 | |
parent | ba6929f6690a72485ac3c6b7610ffbd5ab319be7 (diff) |
volume_id: remove deprecated functions and bump major version
42 files changed, 145 insertions, 155 deletions
diff --git a/configure.ac b/configure.ac index 4be3ed583a..a98d903c21 100644 --- a/configure.ac +++ b/configure.ac @@ -18,8 +18,8 @@ AC_SUBST(LIBUDEV_LT_REVISION) AC_SUBST(LIBUDEV_LT_AGE) dnl /* libvolume_id version */ -VOLID_LT_CURRENT=0 -VOLID_LT_REVISION=86 +VOLID_LT_CURRENT=1 +VOLID_LT_REVISION=0 VOLID_LT_AGE=0 AC_SUBST(VOLID_LT_CURRENT) AC_SUBST(VOLID_LT_REVISION) diff --git a/extras/volume_id/lib/Makefile.am b/extras/volume_id/lib/Makefile.am index 6313962e68..f9c6fbe306 100644 --- a/extras/volume_id/lib/Makefile.am +++ b/extras/volume_id/lib/Makefile.am @@ -6,6 +6,7 @@ include_HEADERS =\ libvolume_id.h libvolume_id_la_SOURCES =\ + libvolume_id-private.h \ ext.c \ fat.c \ hfs.c \ diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c index 5ab9451890..45a56dcfbd 100644 --- a/extras/volume_id/lib/adaptec_raid.c +++ b/extras/volume_id/lib/adaptec_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct adaptec_meta { diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c index 9c7eaf6177..afbdf886d0 100644 --- a/extras/volume_id/lib/cramfs.c +++ b/extras/volume_id/lib/cramfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct cramfs_super { diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c index 2e83c08098..de7b7a7b63 100644 --- a/extras/volume_id/lib/ddf_raid.c +++ b/extras/volume_id/lib/ddf_raid.c @@ -25,6 +25,7 @@ #include <byteswap.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" /* http://www.snia.org/standards/home */ diff --git a/extras/volume_id/lib/exported_symbols b/extras/volume_id/lib/exported_symbols index 55b0265825..d3b925c683 100644 --- a/extras/volume_id/lib/exported_symbols +++ b/extras/volume_id/lib/exported_symbols @@ -14,42 +14,3 @@ volume_id_probe_raid volume_id_all_probers volume_id_get_prober_by_type volume_id_encode_string -volume_id_open_node -volume_id_probe_linux_swap -volume_id_probe_luks -volume_id_probe_cramfs -volume_id_probe_ext -volume_id_probe_vfat -volume_id_probe_hfs_hfsplus -volume_id_probe_hpfs -volume_id_probe_iso9660 -volume_id_probe_jfs -volume_id_probe_minix -volume_id_probe_ntfs -volume_id_probe_ocfs1 -volume_id_probe_ocfs2 -volume_id_probe_reiserfs -volume_id_probe_romfs -volume_id_probe_sysv -volume_id_probe_udf -volume_id_probe_ufs -volume_id_probe_vxfs -volume_id_probe_xfs -volume_id_probe_squashfs -volume_id_probe_netware -volume_id_probe_gfs -volume_id_probe_gfs2 -volume_id_probe_linux_raid -volume_id_probe_lvm1 -volume_id_probe_lvm2 -volume_id_probe_ddf_raid -volume_id_probe_intel_software_raid -volume_id_probe_highpoint_37x_raid -volume_id_probe_highpoint_45x_raid -volume_id_probe_lsi_mega_raid -volume_id_probe_nvidia_raid -volume_id_probe_promise_fasttrack_raid -volume_id_probe_silicon_medley_raid -volume_id_probe_via_raid -volume_id_probe_adaptec_raid -volume_id_probe_jmicron_raid diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c index 56edd2531f..49b7c5d060 100644 --- a/extras/volume_id/lib/ext.c +++ b/extras/volume_id/lib/ext.c @@ -27,6 +27,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct ext2_super_block { diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c index 58f8f825c4..759e106f68 100644 --- a/extras/volume_id/lib/fat.c +++ b/extras/volume_id/lib/fat.c @@ -25,6 +25,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define FAT12_MAX 0xff5 diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c index 2cb16a8693..e1293ebce7 100644 --- a/extras/volume_id/lib/gfs.c +++ b/extras/volume_id/lib/gfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" /* Common gfs/gfs2 constants: */ diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c index b6d7e0290b..f8a4baf8fb 100644 --- a/extras/volume_id/lib/hfs.c +++ b/extras/volume_id/lib/hfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct hfs_finder_info{ diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c index 0629015117..23e25bcca1 100644 --- a/extras/volume_id/lib/highpoint.c +++ b/extras/volume_id/lib/highpoint.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct hpt37x_meta { diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c index ac5a35437a..a95e778e5e 100644 --- a/extras/volume_id/lib/hpfs.c +++ b/extras/volume_id/lib/hpfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct hpfs_super diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c index 0e2c686fa2..367deee4d6 100644 --- a/extras/volume_id/lib/iso9660.c +++ b/extras/volume_id/lib/iso9660.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define ISO_SUPERBLOCK_OFFSET 0x8000 diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c index 337a9cecbd..f62d106f53 100644 --- a/extras/volume_id/lib/isw_raid.c +++ b/extras/volume_id/lib/isw_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct isw_meta { diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c index 950ba43e1c..d4a5f0febb 100644 --- a/extras/volume_id/lib/jfs.c +++ b/extras/volume_id/lib/jfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct jfs_super_block { diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c index 6cb1f6f315..2279c4df5c 100644 --- a/extras/volume_id/lib/jmicron_raid.c +++ b/extras/volume_id/lib/jmicron_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct jmicron_meta { diff --git a/extras/volume_id/lib/libvolume_id-private.h b/extras/volume_id/lib/libvolume_id-private.h new file mode 100644 index 0000000000..578f6fc4e7 --- /dev/null +++ b/extras/volume_id/lib/libvolume_id-private.h @@ -0,0 +1,103 @@ +/* + * volume_id - reads volume label and uuid + * + * Copyright (C) 2005-2007 Kay Sievers <kay.sievers@vrfy.org> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 of the License. + */ + +#ifndef _LIBVOLUME_ID_PRIVATE_H_ +#define _LIBVOLUME_ID_PRIVATE_H_ + +#include <stdint.h> +#include <stddef.h> + +#include "libvolume_id.h" + +#define VOLUME_ID_LABEL_SIZE 64 +#define VOLUME_ID_UUID_SIZE 36 +#define VOLUME_ID_FORMAT_SIZE 32 +#define VOLUME_ID_PATH_MAX 256 +#define VOLUME_ID_PARTITIONS_MAX 256 + +enum volume_id_usage { + VOLUME_ID_UNUSED, + VOLUME_ID_UNPROBED, + VOLUME_ID_OTHER, + VOLUME_ID_FILESYSTEM, + VOLUME_ID_RAID, + VOLUME_ID_DISKLABEL, + VOLUME_ID_CRYPTO, +}; + +struct volume_id { + uint8_t label_raw[VOLUME_ID_LABEL_SIZE]; + size_t label_raw_len; + char label[VOLUME_ID_LABEL_SIZE+1]; + uint8_t uuid_raw[VOLUME_ID_UUID_SIZE]; + size_t uuid_raw_len; + char uuid[VOLUME_ID_UUID_SIZE+1]; + enum volume_id_usage usage_id; + char *usage; + char *type; + char type_version[VOLUME_ID_FORMAT_SIZE]; + + int fd; + uint8_t *sbbuf; + size_t sbbuf_len; + uint8_t *seekbuf; + uint64_t seekbuf_off; + size_t seekbuf_len; + int fd_close:1; +}; + +/* filesystems */ +extern int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_gfs(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_gfs2(struct volume_id *id, uint64_t off, uint64_t size); + +/* special formats */ +extern int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_luks(struct volume_id *id, uint64_t off, uint64_t size); + +/* raid */ +extern int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_oracleasm(struct volume_id *id, uint64_t off, uint64_t size); + +/* bios raid */ +extern int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t size); +extern int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t size); + +#endif diff --git a/extras/volume_id/lib/libvolume_id.h b/extras/volume_id/lib/libvolume_id.h index 6cce6e377d..d1a0077f0c 100644 --- a/extras/volume_id/lib/libvolume_id.h +++ b/extras/volume_id/lib/libvolume_id.h @@ -1,7 +1,7 @@ /* * volume_id - reads volume label and uuid * - * Copyright (C) 2005-2007 Kay Sievers <kay.sievers@vrfy.org> + * Copyright (C) 2005-2008 Kay Sievers <kay.sievers@vrfy.org> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -14,11 +14,11 @@ #include <stdint.h> #include <stddef.h> +struct volume_id; typedef void (*volume_id_log_fn_t)(int priority, const char *file, int line, const char *format, ...) __attribute__ ((format(printf, 4, 5))); extern volume_id_log_fn_t volume_id_log_fn; -struct volume_id; typedef int (*volume_id_probe_fn_t)(struct volume_id *id, uint64_t off, uint64_t size); typedef int (*all_probers_fn_t)(volume_id_probe_fn_t probe_fn, struct volume_id *id, uint64_t off, uint64_t size, @@ -42,95 +42,4 @@ extern int volume_id_get_type(struct volume_id *id, const char **type); extern int volume_id_get_type_version(struct volume_id *id, const char **type_version); extern int volume_id_encode_string(const char *str, char *str_enc, size_t len); -/* - * Note: everything below will be made private or removed from - * a future version, and a new major release of libvolume_id - */ - -extern struct volume_id *volume_id_open_node(const char *path); - -#define VOLUME_ID_LABEL_SIZE 64 -#define VOLUME_ID_UUID_SIZE 36 -#define VOLUME_ID_FORMAT_SIZE 32 -#define VOLUME_ID_PATH_MAX 256 -#define VOLUME_ID_PARTITIONS_MAX 256 - -enum volume_id_usage { - VOLUME_ID_UNUSED, - VOLUME_ID_UNPROBED, - VOLUME_ID_OTHER, - VOLUME_ID_FILESYSTEM, - VOLUME_ID_RAID, - VOLUME_ID_DISKLABEL, - VOLUME_ID_CRYPTO, -}; - -struct volume_id { - uint8_t label_raw[VOLUME_ID_LABEL_SIZE]; - size_t label_raw_len; - char label[VOLUME_ID_LABEL_SIZE+1]; - uint8_t uuid_raw[VOLUME_ID_UUID_SIZE]; - size_t uuid_raw_len; - char uuid[VOLUME_ID_UUID_SIZE+1]; - enum volume_id_usage usage_id; - char *usage; - char *type; - char type_version[VOLUME_ID_FORMAT_SIZE]; - - int fd; - uint8_t *sbbuf; - size_t sbbuf_len; - uint8_t *seekbuf; - uint64_t seekbuf_off; - size_t seekbuf_len; - int fd_close:1; -}; - -/* filesystems */ -extern int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_gfs(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_gfs2(struct volume_id *id, uint64_t off, uint64_t size); - -/* special formats */ -extern int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_luks(struct volume_id *id, uint64_t off, uint64_t size); - -/* raid */ -extern int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_oracleasm(struct volume_id *id, uint64_t off, uint64_t size); - -/* bios raid */ -extern int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t size); -extern int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t size); - #endif diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c index af496584c4..5d95b502e3 100644 --- a/extras/volume_id/lib/linux_raid.c +++ b/extras/volume_id/lib/linux_raid.c @@ -25,6 +25,7 @@ #include <byteswap.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct mdp0_super_block { diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c index 592a38570d..13a0077f60 100644 --- a/extras/volume_id/lib/linux_swap.c +++ b/extras/volume_id/lib/linux_swap.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct swap_header_v1_2 { diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c index eef87142b8..30ebe7b5e6 100644 --- a/extras/volume_id/lib/lsi_raid.c +++ b/extras/volume_id/lib/lsi_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct lsi_meta { diff --git a/extras/volume_id/lib/luks.c b/extras/volume_id/lib/luks.c index 20b50d0efd..4fb97e3598 100644 --- a/extras/volume_id/lib/luks.c +++ b/extras/volume_id/lib/luks.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define SECTOR_SHIFT 9 diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c index d234113d77..5dc360f65d 100644 --- a/extras/volume_id/lib/lvm.c +++ b/extras/volume_id/lib/lvm.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct lvm1_super_block { diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c index 88b4c189c4..41bdab2fe6 100644 --- a/extras/volume_id/lib/minix.c +++ b/extras/volume_id/lib/minix.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define MINIX_SUPERBLOCK_OFFSET 0x400 diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c index c03455791c..249dbbf20d 100644 --- a/extras/volume_id/lib/netware.c +++ b/extras/volume_id/lib/netware.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define NW_SUPERBLOCK_OFFSET 0x1000 diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c index 1e73bc8f15..3d1e05798a 100644 --- a/extras/volume_id/lib/ntfs.c +++ b/extras/volume_id/lib/ntfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" static struct ntfs_super_block { diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c index c6b5185399..5af3724c49 100644 --- a/extras/volume_id/lib/nvidia_raid.c +++ b/extras/volume_id/lib/nvidia_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct nvidia_meta { diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c index ec81f5e8e3..d56a64ae5e 100644 --- a/extras/volume_id/lib/ocfs.c +++ b/extras/volume_id/lib/ocfs.c @@ -25,6 +25,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" diff --git a/extras/volume_id/lib/oracleasm.c b/extras/volume_id/lib/oracleasm.c index 0f5ff80cfb..9ea00e20cc 100644 --- a/extras/volume_id/lib/oracleasm.c +++ b/extras/volume_id/lib/oracleasm.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct oracleasm_super_block { diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c index ecaed00986..09aaaf9665 100644 --- a/extras/volume_id/lib/promise_raid.c +++ b/extras/volume_id/lib/promise_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct promise_meta { diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c index 0f30233eaf..188607b7c1 100644 --- a/extras/volume_id/lib/reiserfs.c +++ b/extras/volume_id/lib/reiserfs.c @@ -25,6 +25,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct reiserfs_super_block { diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c index 303a1fb40e..01fbf81b79 100644 --- a/extras/volume_id/lib/romfs.c +++ b/extras/volume_id/lib/romfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct romfs_super { diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c index cfdcbcb868..a0cda375e5 100644 --- a/extras/volume_id/lib/silicon_raid.c +++ b/extras/volume_id/lib/silicon_raid.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct silicon_meta { diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c index 18e44abcb4..e39e1a12ee 100644 --- a/extras/volume_id/lib/squashfs.c +++ b/extras/volume_id/lib/squashfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define SQUASHFS_MAGIC 0x73717368 diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c index ba37c4d0a6..fe8efecd9b 100644 --- a/extras/volume_id/lib/sysv.c +++ b/extras/volume_id/lib/sysv.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define SYSV_NICINOD 100 diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c index 2a589c5f2a..b0865b2e8d 100644 --- a/extras/volume_id/lib/udf.c +++ b/extras/volume_id/lib/udf.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct volume_descriptor { diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c index bedcfa47da..26c3df6d14 100644 --- a/extras/volume_id/lib/ufs.c +++ b/extras/volume_id/lib/ufs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct ufs_super_block { diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c index 2a63efe8f7..ea07cfd6c1 100644 --- a/extras/volume_id/lib/util.c +++ b/extras/volume_id/lib/util.c @@ -26,6 +26,7 @@ #include <sys/stat.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" /* count of characters used to encode one unicode char */ diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c index 9965e13bc2..7e1ac26084 100644 --- a/extras/volume_id/lib/via_raid.c +++ b/extras/volume_id/lib/via_raid.c @@ -27,6 +27,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct via_meta { diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c index b247fe2ddb..86e66bb76c 100644 --- a/extras/volume_id/lib/volume_id.c +++ b/extras/volume_id/lib/volume_id.c @@ -26,6 +26,7 @@ #include <sys/stat.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -489,27 +490,6 @@ struct volume_id *volume_id_open_fd(int fd) return id; } -struct volume_id *volume_id_open_node(const char *path) -{ - struct volume_id *id; - int fd; - - fd = open(path, O_RDONLY); - if (fd < 0) { - dbg("unable to open '%s'\n", path); - return NULL; - } - - id = volume_id_open_fd(fd); - if (id == NULL) - return NULL; - - /* close fd on device close */ - id->fd_close = 1; - - return id; -} - /** * volume_id_close: * @id: Probing context. diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c index 33d357b7d8..5d31920113 100644 --- a/extras/volume_id/lib/vxfs.c +++ b/extras/volume_id/lib/vxfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" #define VXFS_SUPER_MAGIC 0xa501FCF5 diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c index 3e10560af9..5b14f449fe 100644 --- a/extras/volume_id/lib/xfs.c +++ b/extras/volume_id/lib/xfs.c @@ -24,6 +24,7 @@ #include <ctype.h> #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct xfs_super_block { |