From: Kay Sievers Date: Thu, 28 Aug 2008 21:39:41 +0000 (+0200) Subject: volume_id: remove deprecated functions and bump major version X-Git-Tag: 174~1619 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2603474ff9be2418900581da1af5cccc9f13cae1;p=systemd volume_id: remove deprecated functions and bump major version --- diff --git a/configure.ac b/configure.ac index 4be3ed58..a98d903c 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 6313962e..f9c6fbe3 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 5ab94518..45a56dcf 100644 --- a/extras/volume_id/lib/adaptec_raid.c +++ b/extras/volume_id/lib/adaptec_raid.c @@ -24,6 +24,7 @@ #include #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 9c7eaf61..afbdf886 100644 --- a/extras/volume_id/lib/cramfs.c +++ b/extras/volume_id/lib/cramfs.c @@ -24,6 +24,7 @@ #include #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 2e83c080..de7b7a7b 100644 --- a/extras/volume_id/lib/ddf_raid.c +++ b/extras/volume_id/lib/ddf_raid.c @@ -25,6 +25,7 @@ #include #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 55b02658..d3b925c6 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 56edd253..49b7c5d0 100644 --- a/extras/volume_id/lib/ext.c +++ b/extras/volume_id/lib/ext.c @@ -27,6 +27,7 @@ #include #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 58f8f825..759e106f 100644 --- a/extras/volume_id/lib/fat.c +++ b/extras/volume_id/lib/fat.c @@ -25,6 +25,7 @@ #include #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 2cb16a86..e1293ebc 100644 --- a/extras/volume_id/lib/gfs.c +++ b/extras/volume_id/lib/gfs.c @@ -24,6 +24,7 @@ #include #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 b6d7e029..f8a4baf8 100644 --- a/extras/volume_id/lib/hfs.c +++ b/extras/volume_id/lib/hfs.c @@ -24,6 +24,7 @@ #include #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 06290151..23e25bcc 100644 --- a/extras/volume_id/lib/highpoint.c +++ b/extras/volume_id/lib/highpoint.c @@ -24,6 +24,7 @@ #include #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 ac5a3543..a95e778e 100644 --- a/extras/volume_id/lib/hpfs.c +++ b/extras/volume_id/lib/hpfs.c @@ -24,6 +24,7 @@ #include #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 0e2c686f..367deee4 100644 --- a/extras/volume_id/lib/iso9660.c +++ b/extras/volume_id/lib/iso9660.c @@ -24,6 +24,7 @@ #include #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 337a9cec..f62d106f 100644 --- a/extras/volume_id/lib/isw_raid.c +++ b/extras/volume_id/lib/isw_raid.c @@ -24,6 +24,7 @@ #include #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 950ba43e..d4a5f0fe 100644 --- a/extras/volume_id/lib/jfs.c +++ b/extras/volume_id/lib/jfs.c @@ -24,6 +24,7 @@ #include #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 6cb1f6f3..2279c4df 100644 --- a/extras/volume_id/lib/jmicron_raid.c +++ b/extras/volume_id/lib/jmicron_raid.c @@ -24,6 +24,7 @@ #include #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 00000000..578f6fc4 --- /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 + * + * 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 +#include + +#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 6cce6e37..d1a0077f 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 + * Copyright (C) 2005-2008 Kay Sievers * * 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 #include +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 af496584..5d95b502 100644 --- a/extras/volume_id/lib/linux_raid.c +++ b/extras/volume_id/lib/linux_raid.c @@ -25,6 +25,7 @@ #include #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 592a3857..13a0077f 100644 --- a/extras/volume_id/lib/linux_swap.c +++ b/extras/volume_id/lib/linux_swap.c @@ -24,6 +24,7 @@ #include #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 eef87142..30ebe7b5 100644 --- a/extras/volume_id/lib/lsi_raid.c +++ b/extras/volume_id/lib/lsi_raid.c @@ -24,6 +24,7 @@ #include #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 20b50d0e..4fb97e35 100644 --- a/extras/volume_id/lib/luks.c +++ b/extras/volume_id/lib/luks.c @@ -24,6 +24,7 @@ #include #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 d234113d..5dc360f6 100644 --- a/extras/volume_id/lib/lvm.c +++ b/extras/volume_id/lib/lvm.c @@ -24,6 +24,7 @@ #include #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 88b4c189..41bdab2f 100644 --- a/extras/volume_id/lib/minix.c +++ b/extras/volume_id/lib/minix.c @@ -24,6 +24,7 @@ #include #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 c0345579..249dbbf2 100644 --- a/extras/volume_id/lib/netware.c +++ b/extras/volume_id/lib/netware.c @@ -24,6 +24,7 @@ #include #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 1e73bc8f..3d1e0579 100644 --- a/extras/volume_id/lib/ntfs.c +++ b/extras/volume_id/lib/ntfs.c @@ -24,6 +24,7 @@ #include #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 c6b51853..5af3724c 100644 --- a/extras/volume_id/lib/nvidia_raid.c +++ b/extras/volume_id/lib/nvidia_raid.c @@ -24,6 +24,7 @@ #include #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 ec81f5e8..d56a64ae 100644 --- a/extras/volume_id/lib/ocfs.c +++ b/extras/volume_id/lib/ocfs.c @@ -25,6 +25,7 @@ #include #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 0f5ff80c..9ea00e20 100644 --- a/extras/volume_id/lib/oracleasm.c +++ b/extras/volume_id/lib/oracleasm.c @@ -24,6 +24,7 @@ #include #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 ecaed009..09aaaf96 100644 --- a/extras/volume_id/lib/promise_raid.c +++ b/extras/volume_id/lib/promise_raid.c @@ -24,6 +24,7 @@ #include #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 0f30233e..188607b7 100644 --- a/extras/volume_id/lib/reiserfs.c +++ b/extras/volume_id/lib/reiserfs.c @@ -25,6 +25,7 @@ #include #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 303a1fb4..01fbf81b 100644 --- a/extras/volume_id/lib/romfs.c +++ b/extras/volume_id/lib/romfs.c @@ -24,6 +24,7 @@ #include #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 cfdcbcb8..a0cda375 100644 --- a/extras/volume_id/lib/silicon_raid.c +++ b/extras/volume_id/lib/silicon_raid.c @@ -24,6 +24,7 @@ #include #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 18e44abc..e39e1a12 100644 --- a/extras/volume_id/lib/squashfs.c +++ b/extras/volume_id/lib/squashfs.c @@ -24,6 +24,7 @@ #include #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 ba37c4d0..fe8efecd 100644 --- a/extras/volume_id/lib/sysv.c +++ b/extras/volume_id/lib/sysv.c @@ -24,6 +24,7 @@ #include #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 2a589c5f..b0865b2e 100644 --- a/extras/volume_id/lib/udf.c +++ b/extras/volume_id/lib/udf.c @@ -24,6 +24,7 @@ #include #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 bedcfa47..26c3df6d 100644 --- a/extras/volume_id/lib/ufs.c +++ b/extras/volume_id/lib/ufs.c @@ -24,6 +24,7 @@ #include #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 2a63efe8..ea07cfd6 100644 --- a/extras/volume_id/lib/util.c +++ b/extras/volume_id/lib/util.c @@ -26,6 +26,7 @@ #include #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 9965e13b..7e1ac260 100644 --- a/extras/volume_id/lib/via_raid.c +++ b/extras/volume_id/lib/via_raid.c @@ -27,6 +27,7 @@ #include #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 b247fe2d..86e66bb7 100644 --- a/extras/volume_id/lib/volume_id.c +++ b/extras/volume_id/lib/volume_id.c @@ -26,6 +26,7 @@ #include #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 33d357b7..5d319201 100644 --- a/extras/volume_id/lib/vxfs.c +++ b/extras/volume_id/lib/vxfs.c @@ -24,6 +24,7 @@ #include #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 3e10560a..5b14f449 100644 --- a/extras/volume_id/lib/xfs.c +++ b/extras/volume_id/lib/xfs.c @@ -24,6 +24,7 @@ #include #include "libvolume_id.h" +#include "libvolume_id-private.h" #include "util.h" struct xfs_super_block {