chiark / gitweb /
volume_id: provide libvolume_id.a file
authorKay Sievers <kay.sievers@suse.de>
Wed, 9 Nov 2005 14:08:45 +0000 (15:08 +0100)
committerKay Sievers <kay.sievers@suse.de>
Wed, 9 Nov 2005 14:08:45 +0000 (15:08 +0100)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
70 files changed:
extras/volume_id/Makefile
extras/volume_id/libvolume_id/Makefile [new file with mode: 0644]
extras/volume_id/libvolume_id/cramfs.c [moved from extras/volume_id/volume_id/cramfs.c with 98% similarity]
extras/volume_id/libvolume_id/ext.c [moved from extras/volume_id/volume_id/ext.c with 99% similarity]
extras/volume_id/libvolume_id/fat.c [moved from extras/volume_id/volume_id/fat.c with 99% similarity]
extras/volume_id/libvolume_id/hfs.c [moved from extras/volume_id/volume_id/hfs.c with 99% similarity]
extras/volume_id/libvolume_id/highpoint.c [moved from extras/volume_id/volume_id/highpoint.c with 98% similarity]
extras/volume_id/libvolume_id/hpfs.c [moved from extras/volume_id/volume_id/hpfs.c with 98% similarity]
extras/volume_id/libvolume_id/iso9660.c [moved from extras/volume_id/volume_id/iso9660.c with 99% similarity]
extras/volume_id/libvolume_id/isw_raid.c [moved from extras/volume_id/volume_id/isw_raid.c with 98% similarity]
extras/volume_id/libvolume_id/jfs.c [moved from extras/volume_id/volume_id/jfs.c with 98% similarity]
extras/volume_id/libvolume_id/linux_raid.c [moved from extras/volume_id/volume_id/linux_raid.c with 98% similarity]
extras/volume_id/libvolume_id/linux_swap.c [moved from extras/volume_id/volume_id/linux_swap.c with 98% similarity]
extras/volume_id/libvolume_id/logging.h [moved from extras/volume_id/volume_id/logging.h with 100% similarity]
extras/volume_id/libvolume_id/lsi_raid.c [moved from extras/volume_id/volume_id/lsi_raid.c with 98% similarity]
extras/volume_id/libvolume_id/luks.c [moved from extras/volume_id/volume_id/luks.c with 99% similarity]
extras/volume_id/libvolume_id/lvm.c [moved from extras/volume_id/volume_id/lvm.c with 99% similarity]
extras/volume_id/libvolume_id/mac.c [moved from extras/volume_id/volume_id/mac.c with 99% similarity]
extras/volume_id/libvolume_id/minix.c [moved from extras/volume_id/volume_id/minix.c with 98% similarity]
extras/volume_id/libvolume_id/msdos.c [moved from extras/volume_id/volume_id/msdos.c with 99% similarity]
extras/volume_id/libvolume_id/ntfs.c [moved from extras/volume_id/volume_id/ntfs.c with 99% similarity]
extras/volume_id/libvolume_id/nvidia_raid.c [moved from extras/volume_id/volume_id/nvidia_raid.c with 98% similarity]
extras/volume_id/libvolume_id/ocfs.c [moved from extras/volume_id/volume_id/ocfs.c with 99% similarity]
extras/volume_id/libvolume_id/promise_raid.c [moved from extras/volume_id/volume_id/promise_raid.c with 98% similarity]
extras/volume_id/libvolume_id/reiserfs.c [moved from extras/volume_id/volume_id/reiserfs.c with 99% similarity]
extras/volume_id/libvolume_id/romfs.c [moved from extras/volume_id/volume_id/romfs.c with 98% similarity]
extras/volume_id/libvolume_id/silicon_raid.c [moved from extras/volume_id/volume_id/silicon_raid.c with 98% similarity]
extras/volume_id/libvolume_id/sysv.c [moved from extras/volume_id/volume_id/sysv.c with 99% similarity]
extras/volume_id/libvolume_id/udf.c [moved from extras/volume_id/volume_id/udf.c with 99% similarity]
extras/volume_id/libvolume_id/ufs.c [moved from extras/volume_id/volume_id/ufs.c with 99% similarity]
extras/volume_id/libvolume_id/util.c [moved from extras/volume_id/volume_id/util.c with 100% similarity]
extras/volume_id/libvolume_id/util.h [moved from extras/volume_id/volume_id/util.h with 100% similarity]
extras/volume_id/libvolume_id/via_raid.c [moved from extras/volume_id/volume_id/via_raid.c with 98% similarity]
extras/volume_id/libvolume_id/volume_id.c [moved from extras/volume_id/volume_id/volume_id.c with 78% similarity]
extras/volume_id/libvolume_id/volume_id.h [new file with mode: 0644]
extras/volume_id/libvolume_id/vxfs.c [moved from extras/volume_id/volume_id/vxfs.c with 98% similarity]
extras/volume_id/libvolume_id/xfs.c [moved from extras/volume_id/volume_id/xfs.c with 98% similarity]
extras/volume_id/vol_id.c
extras/volume_id/volume_id/Makefile.inc [deleted file]
extras/volume_id/volume_id/cramfs.h [deleted file]
extras/volume_id/volume_id/ext.h [deleted file]
extras/volume_id/volume_id/fat.h [deleted file]
extras/volume_id/volume_id/hfs.h [deleted file]
extras/volume_id/volume_id/highpoint.h [deleted file]
extras/volume_id/volume_id/hpfs.h [deleted file]
extras/volume_id/volume_id/iso9660.h [deleted file]
extras/volume_id/volume_id/isw_raid.h [deleted file]
extras/volume_id/volume_id/jfs.h [deleted file]
extras/volume_id/volume_id/linux_raid.h [deleted file]
extras/volume_id/volume_id/linux_swap.h [deleted file]
extras/volume_id/volume_id/lsi_raid.h [deleted file]
extras/volume_id/volume_id/luks.h [deleted file]
extras/volume_id/volume_id/lvm.h [deleted file]
extras/volume_id/volume_id/mac.h [deleted file]
extras/volume_id/volume_id/minix.h [deleted file]
extras/volume_id/volume_id/msdos.h [deleted file]
extras/volume_id/volume_id/ntfs.h [deleted file]
extras/volume_id/volume_id/nvidia_raid.h [deleted file]
extras/volume_id/volume_id/ocfs.h [deleted file]
extras/volume_id/volume_id/promise_raid.h [deleted file]
extras/volume_id/volume_id/reiserfs.h [deleted file]
extras/volume_id/volume_id/romfs.h [deleted file]
extras/volume_id/volume_id/silicon_raid.h [deleted file]
extras/volume_id/volume_id/sysv.h [deleted file]
extras/volume_id/volume_id/udf.h [deleted file]
extras/volume_id/volume_id/ufs.h [deleted file]
extras/volume_id/volume_id/via_raid.h [deleted file]
extras/volume_id/volume_id/volume_id.h [deleted file]
extras/volume_id/volume_id/vxfs.h [deleted file]
extras/volume_id/volume_id/xfs.h [deleted file]

index 23de2ba091a8f681e37709e581e8c43bba40e5df..30c0abb9a4e683462f999eb5d219602286ac4e6a 100644 (file)
@@ -5,12 +5,8 @@
 # Released under the GNU General Public License, version 2.
 #
 
 # Released under the GNU General Public License, version 2.
 #
 
-VOLUME_ID_BASE=volume_id
-include $(VOLUME_ID_BASE)/Makefile.inc
-
 PROG = vol_id
 PROG = vol_id
-OBJS = $(VOLUME_ID_OBJS)
-HEADERS = $(VOLUME_ID_HEADERS)
+LIBVOLUME_ID = libvolume_id/libvolume_id.a
 GEN_HEADERS =
 MAN_PAGES =
 
 GEN_HEADERS =
 MAN_PAGES =
 
@@ -36,8 +32,11 @@ all: $(PROG) $(MAN_PAGES)
 %.o: %.c $(GEN_HEADERS)
        $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
 
 %.o: %.c $(GEN_HEADERS)
        $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
 
-$(PROG): %: $(HEADERS) %.o $(OBJS)
-       $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+$(LIBVOLUME_ID):
+       $(MAKE) -C libvolume_id
+
+$(PROG): %: $(HEADERS) %.o $(LIBVOLUME_ID)
+       $(QUIET) $(LD) $(LDFLAGS) $@.o $(LIBVOLUME_ID) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
 ifneq ($(strip $(STRIPCMD)),)
        $(QUIET) $(STRIPCMD) $@
 endif
 ifneq ($(strip $(STRIPCMD)),)
        $(QUIET) $(STRIPCMD) $@
 endif
@@ -49,6 +48,7 @@ endif
 
 clean:
        rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
 
 clean:
        rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+       $(MAKE) -C libvolume_id clean
 .PHONY: clean
 
 install-bin: all
 .PHONY: clean
 
 install-bin: all
diff --git a/extras/volume_id/libvolume_id/Makefile b/extras/volume_id/libvolume_id/Makefile
new file mode 100644 (file)
index 0000000..02c24ea
--- /dev/null
@@ -0,0 +1,66 @@
+# Makefile for udev extra invoked from the udev main Makefile
+#
+# Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
+#
+# Released under the GNU General Public License, version 2.
+#
+
+LIBVOLUME_ID = libvolume_id.a
+
+OBJS=                          \
+       ext.o                   \
+       fat.o                   \
+       hfs.o                   \
+       highpoint.o             \
+       isw_raid.o              \
+       lsi_raid.o              \
+       via_raid.o              \
+       silicon_raid.o          \
+       nvidia_raid.o           \
+       promise_raid.o          \
+       iso9660.o               \
+       jfs.o                   \
+       linux_raid.o            \
+       linux_swap.o            \
+       lvm.o                   \
+       mac.o                   \
+       msdos.o                 \
+       ntfs.o                  \
+       reiserfs.o              \
+       udf.o                   \
+       ufs.o                   \
+       xfs.o                   \
+       cramfs.o                \
+       hpfs.o                  \
+       romfs.o                 \
+       sysv.o                  \
+       minix.o                 \
+       luks.o                  \
+       ocfs.o                  \
+       vxfs.o                  \
+       volume_id.o             \
+       util.o
+
+HEADERS=                       \
+       volume_id.h             \
+       util.h
+
+AR = $(CROSS)ar
+RANLIB = $(CROSS)ranlib
+
+all: $(LIBVOLUME_ID)
+.PHONY: all
+.DEFAULT: all
+
+%.o: %.c
+       $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
+
+$(LIBVOLUME_ID): $(HEADERS) $(OBJS)
+       @rm -f $@
+       $(QUIET) $(AR) cq $@ $(OBJS)
+       $(QUIET) $(RANLIB) $@
+
+clean:
+       rm -f $(LIBVOLUME_ID) $(OBJS)
+.PHONY: clean
+
similarity index 98%
rename from extras/volume_id/volume_id/cramfs.c
rename to extras/volume_id/libvolume_id/cramfs.c
index 85a1bc8c554e82fb3857f4389b365e49ef0e885d..0ad5886b324fa4844493cbf8bf15d5ab40f01f91 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "cramfs.h"
 
 struct cramfs_super {
        uint8_t         magic[4];
 
 struct cramfs_super {
        uint8_t         magic[4];
similarity index 99%
rename from extras/volume_id/volume_id/ext.c
rename to extras/volume_id/libvolume_id/ext.c
index a3e20d3151eba9cc82d6927b5d1e055a421ea5fd..d1f62dfb6f99ddae2a14ec1415ca1d6036f8be38 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "util.h"
 #include "logging.h"
 #include "volume_id.h"
 #include "util.h"
 #include "logging.h"
-#include "ext.h"
 
 struct ext2_super_block {
        uint32_t        s_inodes_count;
 
 struct ext2_super_block {
        uint32_t        s_inodes_count;
similarity index 99%
rename from extras/volume_id/volume_id/fat.c
rename to extras/volume_id/libvolume_id/fat.c
index 74f2bb9194a43b837104bc11c8bc8815cca488fd..26d0fe74ab3c042a978fb2de543b2dd2b3c7ed6c 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "fat.h"
 
 #define FAT12_MAX                      0xff5
 #define FAT16_MAX                      0xfff5
 
 #define FAT12_MAX                      0xff5
 #define FAT16_MAX                      0xfff5
similarity index 99%
rename from extras/volume_id/volume_id/hfs.c
rename to extras/volume_id/libvolume_id/hfs.c
index 8de8b9aaac385ebdeaa5bf5eb16bf319ca71ee2b..27a8ac9999c05da7f4ae19dfed09a88477806099 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "hfs.h"
 
 struct hfs_finder_info{
        uint32_t        boot_folder;
 
 struct hfs_finder_info{
        uint32_t        boot_folder;
similarity index 98%
rename from extras/volume_id/volume_id/highpoint.c
rename to extras/volume_id/libvolume_id/highpoint.c
index 33c4a8c9c0bff7643838271697491d1ee1808a48..721b7ab26f0cfe73c93c7717f5530e7c94cdd83b 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "highpoint.h"
 
 struct hpt37x_meta {
        uint8_t         filler1[32];
 
 struct hpt37x_meta {
        uint8_t         filler1[32];
similarity index 98%
rename from extras/volume_id/volume_id/hpfs.c
rename to extras/volume_id/libvolume_id/hpfs.c
index 3b97d9339d51bafabbda832b47f04acca4f467aa..52cb47be39eef617cd98f56aab276fb45881b00c 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "hpfs.h"
 
 struct hpfs_super
 {
 
 struct hpfs_super
 {
similarity index 99%
rename from extras/volume_id/volume_id/iso9660.c
rename to extras/volume_id/libvolume_id/iso9660.c
index 3999a1e7bfc78a25692497b60ffdfc45d7fe3ab3..b6654cecf22a8152ef8eb47138a876739626ef38 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "iso9660.h"
 
 #define ISO_SUPERBLOCK_OFFSET          0x8000
 #define ISO_SECTOR_SIZE                        0x800
 
 #define ISO_SUPERBLOCK_OFFSET          0x8000
 #define ISO_SECTOR_SIZE                        0x800
similarity index 98%
rename from extras/volume_id/volume_id/isw_raid.c
rename to extras/volume_id/libvolume_id/isw_raid.c
index 745b42f2d111410e4e34321d365491fdd26af3b0..1f49959ff9e1c5f5bea506d8adce3ca36ebdd519 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "isw_raid.h"
 
 struct isw_meta {
        uint8_t         sig[32];
 
 struct isw_meta {
        uint8_t         sig[32];
similarity index 98%
rename from extras/volume_id/volume_id/jfs.c
rename to extras/volume_id/libvolume_id/jfs.c
index 1b2bfdf0e9fcbcfbdf8bc7c0c94d7d08840b7932..b6ae9624d677ee81dd6fdd98a03d51864c33997b 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "jfs.h"
 
 struct jfs_super_block {
        uint8_t         magic[4];
 
 struct jfs_super_block {
        uint8_t         magic[4];
similarity index 98%
rename from extras/volume_id/volume_id/linux_raid.c
rename to extras/volume_id/libvolume_id/linux_raid.c
index eb37dba3671a8fe1267dd03b604243099c409520..d90510a8179a8b17c5793b9525d1a06c66a592a2 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "linux_raid.h"
 
 struct mdp_super_block {
        uint32_t        md_magic;
 
 struct mdp_super_block {
        uint32_t        md_magic;
similarity index 98%
rename from extras/volume_id/volume_id/linux_swap.c
rename to extras/volume_id/libvolume_id/linux_swap.c
index b3e22f6db29feed1abfd47bef42284a275c0cd34..18928b8351c97fc62650ec492bcedba9c4f60f2f 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "linux_swap.h"
 
 struct swap_header_v1_2 {
        uint8_t         bootbits[1024];
 
 struct swap_header_v1_2 {
        uint8_t         bootbits[1024];
similarity index 98%
rename from extras/volume_id/volume_id/lsi_raid.c
rename to extras/volume_id/libvolume_id/lsi_raid.c
index e5da2812039dc07b73353558d3f25def423fc178..2720de763d12fdc49e28090923c3a16fca8e3685 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "lsi_raid.h"
 
 struct lsi_meta {
        uint8_t         sig[6];
 
 struct lsi_meta {
        uint8_t         sig[6];
similarity index 99%
rename from extras/volume_id/volume_id/luks.c
rename to extras/volume_id/libvolume_id/luks.c
index ff90f5d3d195d2a52e43e2d0cd6358e88edefe71..43f326e17639717f1b7df213c51971f58687fa9f 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "util.h"
 #include "logging.h"
 #include "volume_id.h"
 #include "util.h"
 #include "logging.h"
-#include "luks.h"
 
 #define SECTOR_SHIFT                   9
 #define SECTOR_SIZE                    (1 << SECTOR_SHIFT)
 
 #define SECTOR_SHIFT                   9
 #define SECTOR_SIZE                    (1 << SECTOR_SHIFT)
similarity index 99%
rename from extras/volume_id/volume_id/lvm.c
rename to extras/volume_id/libvolume_id/lvm.c
index a188402da8955925b0991aaafa2603f071cc09e8..650986256d384fc11d9d2b070911a14a60df308a 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "lvm.h"
 
 struct lvm1_super_block {
        uint8_t id[2];
 
 struct lvm1_super_block {
        uint8_t id[2];
similarity index 99%
rename from extras/volume_id/volume_id/mac.c
rename to extras/volume_id/libvolume_id/mac.c
index 1587f488239cc36d8591d83b0806fca968b355af..99bcbde6be8ecf34dbecac13f2c9dde309d65e1b 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "mac.h"
 
 struct mac_driver_desc {
        uint8_t         signature[2];
 
 struct mac_driver_desc {
        uint8_t         signature[2];
similarity index 98%
rename from extras/volume_id/volume_id/minix.c
rename to extras/volume_id/libvolume_id/minix.c
index b081afab493f3ffcf1d5f50e800565e592fc3f50..ca57745f783aafa148e5ebef61abfcc29936922b 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "minix.h"
 
 struct minix_super_block
 {
 
 struct minix_super_block
 {
similarity index 99%
rename from extras/volume_id/volume_id/msdos.c
rename to extras/volume_id/libvolume_id/msdos.c
index ab18fc35850bd93396ea6ae020562a5b99139d65..a66046052a428a4ca083c15d961e15af86dbae0e 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "msdos.h"
 
 struct msdos_partition_entry {
        uint8_t         boot_ind;
 
 struct msdos_partition_entry {
        uint8_t         boot_ind;
similarity index 99%
rename from extras/volume_id/volume_id/ntfs.c
rename to extras/volume_id/libvolume_id/ntfs.c
index 39aa2d73c65095e2d8034001ff211ec732eab6da..de9ad6d654b508d0d9b4b007b46bc4f4a839b32c 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "ntfs.h"
 
 struct ntfs_super_block {
        uint8_t         jump[3];
 
 struct ntfs_super_block {
        uint8_t         jump[3];
similarity index 98%
rename from extras/volume_id/volume_id/nvidia_raid.c
rename to extras/volume_id/libvolume_id/nvidia_raid.c
index 9198f1e0674820eeced9e1930af94d93eb179a52..3b967e6979c51db749aba3aaf853d5622619ad9e 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "nvidia_raid.h"
 
 struct nvidia_meta {
        uint8_t         vendor[8];
 
 struct nvidia_meta {
        uint8_t         vendor[8];
similarity index 99%
rename from extras/volume_id/volume_id/ocfs.c
rename to extras/volume_id/libvolume_id/ocfs.c
index 88064ed1938788f6e623cd70c784f502a3bdeefa..faf89bd3e03bd5f857a9df4172f041398afd3945 100644 (file)
@@ -27,7 +27,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "ocfs.h"
 
 
 struct ocfs1_super_block_header {
 
 
 struct ocfs1_super_block_header {
similarity index 98%
rename from extras/volume_id/volume_id/promise_raid.c
rename to extras/volume_id/libvolume_id/promise_raid.c
index 54832a888abd86c8c3ff0fcefa0dbeabc3ee1934..6611aeab32850cdf5f2077dfa7aa76b439fdbfc9 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "promise_raid.h"
 
 struct promise_meta {
        uint8_t sig[24];
 
 struct promise_meta {
        uint8_t sig[24];
similarity index 99%
rename from extras/volume_id/volume_id/reiserfs.c
rename to extras/volume_id/libvolume_id/reiserfs.c
index e64b08acdd2ae99b7489e7533d1fa590bfdcae60..0eecbda5cb0d0da6bc844c8106898a9a714da22b 100644 (file)
@@ -27,7 +27,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "reiserfs.h"
 
 struct reiserfs_super_block {
        uint32_t        blocks_count;
 
 struct reiserfs_super_block {
        uint32_t        blocks_count;
similarity index 98%
rename from extras/volume_id/volume_id/romfs.c
rename to extras/volume_id/libvolume_id/romfs.c
index 3373f364971fc8eb6e7da51c220cbd3eb818cdd3..51ef3739b34ee7a90d78af8abc90d7b7fe7006f2 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "romfs.h"
 
 struct romfs_super {
        uint8_t magic[8];
 
 struct romfs_super {
        uint8_t magic[8];
similarity index 98%
rename from extras/volume_id/volume_id/silicon_raid.c
rename to extras/volume_id/libvolume_id/silicon_raid.c
index 5f68127c4f2a455cf6d84d9ee9be4c9f17c79d1b..a3077647300c2218e3cdad692cf47b8672fa6d16 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "silicon_raid.h"
 
 struct silicon_meta {
        uint8_t         unknown0[0x2E];
 
 struct silicon_meta {
        uint8_t         unknown0[0x2E];
similarity index 99%
rename from extras/volume_id/volume_id/sysv.c
rename to extras/volume_id/libvolume_id/sysv.c
index 610edb8876d8dc8fef61ee89f4bdd1991dfc6cdf..fc874d5beaa95b96a147f479afc5d5e254e59ffd 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "sysv.h"
 
 #define SYSV_NICINOD                   100
 #define SYSV_NICFREE                   50
 
 #define SYSV_NICINOD                   100
 #define SYSV_NICFREE                   50
similarity index 99%
rename from extras/volume_id/volume_id/udf.c
rename to extras/volume_id/libvolume_id/udf.c
index f54ca87c8f9ff810e03be49aabeb7a37b98b4a68..fede1ce68ae161cbfa2c7a2fd4e89a22e7634e8c 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "udf.h"
 
 struct volume_descriptor {
        struct descriptor_tag {
 
 struct volume_descriptor {
        struct descriptor_tag {
similarity index 99%
rename from extras/volume_id/volume_id/ufs.c
rename to extras/volume_id/libvolume_id/ufs.c
index a7bd091c5e61f5f0ef67f3056965f37c581d1da5..ace61db657543efbd2304aad9a265f4146c65794 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "ufs.h"
 
 struct ufs_super_block {
        uint32_t        fs_link;
 
 struct ufs_super_block {
        uint32_t        fs_link;
similarity index 98%
rename from extras/volume_id/volume_id/via_raid.c
rename to extras/volume_id/libvolume_id/via_raid.c
index 2b741230162d7f4da53954c2f5f61bf015ab8c7f..66962cd7f058fdd0ed381e6f27991b574de881b0 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "via_raid.h"
 
 struct via_meta {
        uint16_t        signature;
 
 struct via_meta {
        uint16_t        signature;
similarity index 78%
rename from extras/volume_id/volume_id/volume_id.c
rename to extras/volume_id/libvolume_id/volume_id.c
index b92269863fa0a499acbfd5e794272e86c3cf3fc5..09d1e317257f66b9bc7291b2ae3f8201feaa3b5a 100644 (file)
 #include "logging.h"
 #include "util.h"
 
 #include "logging.h"
 #include "util.h"
 
-#include "ext.h"
-#include "reiserfs.h"
-#include "fat.h"
-#include "hfs.h"
-#include "jfs.h"
-#include "xfs.h"
-#include "ufs.h"
-#include "ntfs.h"
-#include "iso9660.h"
-#include "udf.h"
-#include "highpoint.h"
-#include "isw_raid.h"
-#include "lsi_raid.h"
-#include "via_raid.h"
-#include "silicon_raid.h"
-#include "nvidia_raid.h"
-#include "promise_raid.h"
-#include "luks.h"
-#include "linux_swap.h"
-#include "linux_raid.h"
-#include "lvm.h"
-#include "cramfs.h"
-#include "hpfs.h"
-#include "romfs.h"
-#include "sysv.h"
-#include "minix.h"
-#include "mac.h"
-#include "msdos.h"
-#include "ocfs.h"
-#include "vxfs.h"
 
 int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size)
 {
 
 int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size)
 {
@@ -213,28 +183,6 @@ struct volume_id *volume_id_open_node(const char *path)
        return id;
 }
 
        return id;
 }
 
-/* open volume by major/minor */
-struct volume_id *volume_id_open_dev_t(dev_t devt)
-{
-       struct volume_id *id;
-       char tmp_node[VOLUME_ID_PATH_MAX];
-
-       snprintf(tmp_node, VOLUME_ID_PATH_MAX,
-                "/dev/.volume_id-%u-%u-%u", getpid(), major(devt), minor(devt));
-       tmp_node[VOLUME_ID_PATH_MAX-1] = '\0';
-
-       /* create tempory node to open the block device */
-       unlink(tmp_node);
-       if (mknod(tmp_node, (S_IFBLK | 0600), devt) != 0)
-               return NULL;
-
-       id = volume_id_open_node(tmp_node);
-
-       unlink(tmp_node);
-
-       return id;
-}
-
 void volume_id_close(struct volume_id *id)
 {
        if (id == NULL)
 void volume_id_close(struct volume_id *id)
 {
        if (id == NULL)
diff --git a/extras/volume_id/libvolume_id/volume_id.h b/extras/volume_id/libvolume_id/volume_id.h
new file mode 100644 (file)
index 0000000..f2f3a0d
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * volume_id - reads partition label and uuid
+ *
+ * Copyright (C) 2005 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 _VOLUME_ID_H_
+#define _VOLUME_ID_H_
+
+#include <stdint.h>
+
+#define VOLUME_ID_VERSION              53
+
+#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_PARTITIONTABLE,
+       VOLUME_ID_RAID,
+       VOLUME_ID_DISKLABEL,
+       VOLUME_ID_CRYPTO,
+};
+
+struct volume_id_partition {
+       enum            volume_id_usage usage_id;
+       char            *usage;
+       char            *type;
+       uint64_t        off;
+       uint64_t        len;
+       uint8_t         partition_type_raw;
+};
+
+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];
+
+       struct volume_id_partition *partitions;
+       size_t          partition_count;
+
+       int             fd;
+       uint8_t         *sbbuf;
+       size_t          sbbuf_len;
+       uint8_t         *seekbuf;
+       uint64_t        seekbuf_off;
+       size_t          seekbuf_len;
+       int             fd_close:1;
+};
+
+extern struct volume_id *volume_id_open_fd(int fd);
+extern struct volume_id *volume_id_open_node(const char *path);
+extern int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size);
+extern void volume_id_close(struct volume_id *id);
+
+/* filesystems */
+extern int volume_id_probe_cramfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_ext(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_vfat(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_hpfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_iso9660(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_jfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_minix(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_ntfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_romfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_sysv(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_udf(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_ufs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_vxfs(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_xfs(struct volume_id *id, uint64_t off);
+
+/* special formats */
+extern int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_luks(struct volume_id *id, uint64_t off);
+
+/* 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);
+extern int volume_id_probe_lvm2(struct volume_id *id, uint64_t off);
+
+/* 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);
+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);
+
+/* partition tables */
+extern int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off);
+extern int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off);
+
+#endif
similarity index 98%
rename from extras/volume_id/volume_id/vxfs.c
rename to extras/volume_id/libvolume_id/vxfs.c
index c4a9ace98f39989be028922bf973732ebd716429..0aef36989980490f8b5fd92e22943a9bb0805baf 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "vxfs.h"
 
 #define VXFS_SUPER_MAGIC       0xa501FCF5
 
 
 #define VXFS_SUPER_MAGIC       0xa501FCF5
 
similarity index 98%
rename from extras/volume_id/volume_id/xfs.c
rename to extras/volume_id/libvolume_id/xfs.c
index 7fd629099d2df5f48897ad703e61b740d8faf2c2..a5f5d8432c81e25f1ff48a6228d5d290f9bec8cf 100644 (file)
@@ -26,7 +26,6 @@
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
 #include "volume_id.h"
 #include "logging.h"
 #include "util.h"
-#include "xfs.h"
 
 struct xfs_super_block {
        uint8_t magic[4];
 
 struct xfs_super_block {
        uint8_t magic[4];
index 2b53085c72a6bdc31a624e8698af5b8664d09879..6f99c52728f26b4412dd444f60819f780e7267a7 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "../../udev_utils.h"
 #include "../../logging.h"
 
 #include "../../udev_utils.h"
 #include "../../logging.h"
-#include "volume_id/volume_id.h"
+#include "libvolume_id/volume_id.h"
 
 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
 
 
 #define BLKGETSIZE64 _IOR(0x12,114,size_t)
 
diff --git a/extras/volume_id/volume_id/Makefile.inc b/extras/volume_id/volume_id/Makefile.inc
deleted file mode 100644 (file)
index 6f8dcee..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-VOLUME_ID_OBJS=                                        \
-       $(VOLUME_ID_BASE)/ext.o                 \
-       $(VOLUME_ID_BASE)/fat.o                 \
-       $(VOLUME_ID_BASE)/hfs.o                 \
-       $(VOLUME_ID_BASE)/highpoint.o           \
-       $(VOLUME_ID_BASE)/isw_raid.o            \
-       $(VOLUME_ID_BASE)/lsi_raid.o            \
-       $(VOLUME_ID_BASE)/via_raid.o            \
-       $(VOLUME_ID_BASE)/silicon_raid.o        \
-       $(VOLUME_ID_BASE)/nvidia_raid.o         \
-       $(VOLUME_ID_BASE)/promise_raid.o        \
-       $(VOLUME_ID_BASE)/iso9660.o             \
-       $(VOLUME_ID_BASE)/jfs.o                 \
-       $(VOLUME_ID_BASE)/linux_raid.o          \
-       $(VOLUME_ID_BASE)/linux_swap.o          \
-       $(VOLUME_ID_BASE)/lvm.o                 \
-       $(VOLUME_ID_BASE)/mac.o                 \
-       $(VOLUME_ID_BASE)/msdos.o               \
-       $(VOLUME_ID_BASE)/ntfs.o                \
-       $(VOLUME_ID_BASE)/reiserfs.o            \
-       $(VOLUME_ID_BASE)/udf.o                 \
-       $(VOLUME_ID_BASE)/ufs.o                 \
-       $(VOLUME_ID_BASE)/xfs.o                 \
-       $(VOLUME_ID_BASE)/cramfs.o              \
-       $(VOLUME_ID_BASE)/hpfs.o                \
-       $(VOLUME_ID_BASE)/romfs.o               \
-       $(VOLUME_ID_BASE)/sysv.o                \
-       $(VOLUME_ID_BASE)/minix.o               \
-       $(VOLUME_ID_BASE)/luks.o                \
-       $(VOLUME_ID_BASE)/ocfs.o                \
-       $(VOLUME_ID_BASE)/vxfs.o                \
-       $(VOLUME_ID_BASE)/volume_id.o           \
-       $(VOLUME_ID_BASE)/util.o
-
-VOLUME_ID_HEADERS=                             \
-       $(VOLUME_ID_BASE)/ext.h                 \
-       $(VOLUME_ID_BASE)/fat.h                 \
-       $(VOLUME_ID_BASE)/hfs.h                 \
-       $(VOLUME_ID_BASE)/highpoint.h           \
-       $(VOLUME_ID_BASE)/isw_raid.h            \
-       $(VOLUME_ID_BASE)/lsi_raid.h            \
-       $(VOLUME_ID_BASE)/via_raid.h            \
-       $(VOLUME_ID_BASE)/silicon_raid.h        \
-       $(VOLUME_ID_BASE)/nvidia_raid.h         \
-       $(VOLUME_ID_BASE)/promise_raid.h        \
-       $(VOLUME_ID_BASE)/iso9660.h             \
-       $(VOLUME_ID_BASE)/jfs.h                 \
-       $(VOLUME_ID_BASE)/linux_raid.h          \
-       $(VOLUME_ID_BASE)/linux_swap.h          \
-       $(VOLUME_ID_BASE)/lvm.h                 \
-       $(VOLUME_ID_BASE)/mac.h                 \
-       $(VOLUME_ID_BASE)/msdos.h               \
-       $(VOLUME_ID_BASE)/ntfs.h                \
-       $(VOLUME_ID_BASE)/reiserfs.h            \
-       $(VOLUME_ID_BASE)/udf.h                 \
-       $(VOLUME_ID_BASE)/ufs.h                 \
-       $(VOLUME_ID_BASE)/xfs.h                 \
-       $(VOLUME_ID_BASE)/cramfs.h              \
-       $(VOLUME_ID_BASE)/romfs.h               \
-       $(VOLUME_ID_BASE)/sysv.h                \
-       $(VOLUME_ID_BASE)/minix.h               \
-       $(VOLUME_ID_BASE)/luks.h                \
-       $(VOLUME_ID_BASE)/ocfs.h                \
-       $(VOLUME_ID_BASE)/vxfs.h                \
-       $(VOLUME_ID_BASE)/volume_id.h           \
-       $(VOLUME_ID_BASE)/util.h
diff --git a/extras/volume_id/volume_id/cramfs.h b/extras/volume_id/volume_id/cramfs.h
deleted file mode 100644 (file)
index 0ff19c3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_CRAMFS_
-#define _VOLUME_ID_CRAMFS_
-
-extern int volume_id_probe_cramfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/ext.h b/extras/volume_id/volume_id/ext.h
deleted file mode 100644 (file)
index dfda207..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_EXT_
-#define _VOLUME_ID_EXT_
-
-extern int volume_id_probe_ext(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/fat.h b/extras/volume_id/volume_id/fat.h
deleted file mode 100644 (file)
index 92fa953..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_FAT_
-#define _VOLUME_ID_FAT_
-
-extern int volume_id_probe_vfat(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/hfs.h b/extras/volume_id/volume_id/hfs.h
deleted file mode 100644 (file)
index 4f732b6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_HFS_
-#define _VOLUME_ID_HFS_
-
-extern int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/highpoint.h b/extras/volume_id/volume_id/highpoint.h
deleted file mode 100644 (file)
index f04d5f1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_HIGHPOINT_
-#define _VOLUME_ID_HIGHPOINT_
-
-extern int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off);
-extern int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/hpfs.h b/extras/volume_id/volume_id/hpfs.h
deleted file mode 100644 (file)
index d33e43a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_HPFS_
-#define _VOLUME_ID_HPFS_
-
-extern int volume_id_probe_hpfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/iso9660.h b/extras/volume_id/volume_id/iso9660.h
deleted file mode 100644 (file)
index c407d41..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_ISO9660_
-#define _VOLUME_ID_ISO9660_
-
-extern int volume_id_probe_iso9660(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/isw_raid.h b/extras/volume_id/volume_id/isw_raid.h
deleted file mode 100644 (file)
index 55d8c49..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_ISW_RAID_
-#define _VOLUME_ID_ISW_RAID_
-
-extern int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/jfs.h b/extras/volume_id/volume_id/jfs.h
deleted file mode 100644 (file)
index 4ef0d87..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_JFS_
-#define _VOLUME_ID_JFS_
-
-extern int volume_id_probe_jfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/linux_raid.h b/extras/volume_id/volume_id/linux_raid.h
deleted file mode 100644 (file)
index 8fdeebf..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_LINUX_RAID_
-#define _VOLUME_ID_LINUX_RAID_
-
-extern int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/linux_swap.h b/extras/volume_id/volume_id/linux_swap.h
deleted file mode 100644 (file)
index e31ee6e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_LINUX_SWAP_
-#define _VOLUME_ID_LINUX_SWAP_
-
-extern int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/lsi_raid.h b/extras/volume_id/volume_id/lsi_raid.h
deleted file mode 100644 (file)
index 51a0bfb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_LSI_RAID_
-#define _VOLUME_ID_LSI_RAID_
-
-extern int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/luks.h b/extras/volume_id/volume_id/luks.h
deleted file mode 100644 (file)
index fbf3fcd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 W. Michael Petullo <mike@flyn.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 _VOLUME_ID_LUKS_
-#define _VOLUME_ID_LUKS_
-
-extern int volume_id_probe_luks(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/lvm.h b/extras/volume_id/volume_id/lvm.h
deleted file mode 100644 (file)
index d07cb53..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_LVM_
-#define _VOLUME_ID_LVM_
-
-extern int volume_id_probe_lvm1(struct volume_id *id, uint64_t off);
-extern int volume_id_probe_lvm2(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/mac.h b/extras/volume_id/volume_id/mac.h
deleted file mode 100644 (file)
index 77b8ccd..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_MAC_
-#define _VOLUME_ID_MAC_
-
-extern int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/minix.h b/extras/volume_id/volume_id/minix.h
deleted file mode 100644 (file)
index 3020cc0..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_MINIX_
-#define _VOLUME_ID_MINIX_
-
-extern int volume_id_probe_minix(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/msdos.h b/extras/volume_id/volume_id/msdos.h
deleted file mode 100644 (file)
index b319f05..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_MSDOS_
-#define _VOLUME_ID_MSDOS_
-
-extern int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/ntfs.h b/extras/volume_id/volume_id/ntfs.h
deleted file mode 100644 (file)
index 8d59159..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_NTFS_
-#define _VOLUME_ID_NTFS_
-
-extern int volume_id_probe_ntfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/nvidia_raid.h b/extras/volume_id/volume_id/nvidia_raid.h
deleted file mode 100644 (file)
index 80c5169..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_NVIDIA_RAID_
-#define _VOLUME_ID_NVIDIA_RAID_
-
-extern int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/ocfs.h b/extras/volume_id/volume_id/ocfs.h
deleted file mode 100644 (file)
index 9d46b28..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 Andre Masella <andre@masella.no-ip.org>
- * Copyright (C) 2005 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 _VOLUME_ID_OCFS1_
-#define _VOLUME_ID_OCFS1_
-
-extern int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off);
-extern int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/promise_raid.h b/extras/volume_id/volume_id/promise_raid.h
deleted file mode 100644 (file)
index a46b062..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_PROMISE_RAID_
-#define _VOLUME_ID_PROMISE_RAID_
-
-extern int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/reiserfs.h b/extras/volume_id/volume_id/reiserfs.h
deleted file mode 100644 (file)
index 57ee05e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_REISERFS_
-#define _VOLUME_ID_REISERFS_
-
-extern int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/romfs.h b/extras/volume_id/volume_id/romfs.h
deleted file mode 100644 (file)
index 5fe56dc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_ROMFS_
-#define _VOLUME_ID_ROMFS_
-
-extern int volume_id_probe_romfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/silicon_raid.h b/extras/volume_id/volume_id/silicon_raid.h
deleted file mode 100644 (file)
index f80c1a4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_SILICON_RAID_
-#define _VOLUME_ID_SILICON_RAID_
-
-extern int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/sysv.h b/extras/volume_id/volume_id/sysv.h
deleted file mode 100644 (file)
index b8c369e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_SYSV_
-#define _VOLUME_ID_SYSV_
-
-extern int volume_id_probe_sysv(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/udf.h b/extras/volume_id/volume_id/udf.h
deleted file mode 100644 (file)
index ff95cc1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_UDF_
-#define _VOLUME_ID_UDF_
-
-extern int volume_id_probe_udf(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/ufs.h b/extras/volume_id/volume_id/ufs.h
deleted file mode 100644 (file)
index ae46a92..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID_UFS_
-#define _VOLUME_ID_UFS_
-
-extern int volume_id_probe_ufs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/via_raid.h b/extras/volume_id/volume_id/via_raid.h
deleted file mode 100644 (file)
index 3eeaa2c..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_VIA_RAID_
-#define _VOLUME_ID_VIA_RAID_
-
-extern int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size);
-
-#endif
diff --git a/extras/volume_id/volume_id/volume_id.h b/extras/volume_id/volume_id/volume_id.h
deleted file mode 100644 (file)
index 9994615..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * volume_id - reads partition label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_H_
-#define _VOLUME_ID_H_
-
-#include <stdint.h>
-
-#define VOLUME_ID_VERSION              52
-
-#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_PARTITIONTABLE,
-       VOLUME_ID_RAID,
-       VOLUME_ID_DISKLABEL,
-       VOLUME_ID_CRYPTO,
-};
-
-struct volume_id_partition {
-       enum            volume_id_usage usage_id;
-       char            *usage;
-       char            *type;
-       uint64_t        off;
-       uint64_t        len;
-       uint8_t         partition_type_raw;
-};
-
-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];
-
-       struct volume_id_partition *partitions;
-       size_t          partition_count;
-
-       int             fd;
-       uint8_t         *sbbuf;
-       size_t          sbbuf_len;
-       uint8_t         *seekbuf;
-       uint64_t        seekbuf_off;
-       size_t          seekbuf_len;
-       int             fd_close:1;
-};
-
-extern struct volume_id *volume_id_open_fd(int fd);
-extern struct volume_id *volume_id_open_node(const char *path);
-extern struct volume_id *volume_id_open_dev_t(dev_t devt);
-extern int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size);
-extern void volume_id_close(struct volume_id *id);
-
-#endif
diff --git a/extras/volume_id/volume_id/vxfs.h b/extras/volume_id/volume_id/vxfs.h
deleted file mode 100644 (file)
index 8ca45c3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2005 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 _VOLUME_ID_VXFS_
-#define _VOLUME_ID_VXFS_
-
-extern int volume_id_probe_vxfs(struct volume_id *id, uint64_t off);
-
-#endif
diff --git a/extras/volume_id/volume_id/xfs.h b/extras/volume_id/volume_id/xfs.h
deleted file mode 100644 (file)
index f21cc5f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * volume_id - reads filesystem label and uuid
- *
- * Copyright (C) 2004 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 _VOLUME_ID__
-#define _VOLUME_ID__
-
-extern int volume_id_probe_xfs(struct volume_id *id, uint64_t off);
-
-#endif