summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-11-09 15:08:45 +0100
committerKay Sievers <kay.sievers@suse.de>2005-11-09 15:08:45 +0100
commitaccff726856a0b3258a413d823a534f4f437e6b2 (patch)
tree9b8b81afa1d9d7e024c576b39cf0638f049157f4
parent09c2bab517c58d9447660a9584822c8de6b641f0 (diff)
volume_id: provide libvolume_id.a file
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r--extras/volume_id/Makefile14
-rw-r--r--extras/volume_id/libvolume_id/Makefile66
-rw-r--r--extras/volume_id/libvolume_id/cramfs.c (renamed from extras/volume_id/volume_id/cramfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/ext.c (renamed from extras/volume_id/volume_id/ext.c)1
-rw-r--r--extras/volume_id/libvolume_id/fat.c (renamed from extras/volume_id/volume_id/fat.c)1
-rw-r--r--extras/volume_id/libvolume_id/hfs.c (renamed from extras/volume_id/volume_id/hfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/highpoint.c (renamed from extras/volume_id/volume_id/highpoint.c)1
-rw-r--r--extras/volume_id/libvolume_id/hpfs.c (renamed from extras/volume_id/volume_id/hpfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/iso9660.c (renamed from extras/volume_id/volume_id/iso9660.c)1
-rw-r--r--extras/volume_id/libvolume_id/isw_raid.c (renamed from extras/volume_id/volume_id/isw_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/jfs.c (renamed from extras/volume_id/volume_id/jfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/linux_raid.c (renamed from extras/volume_id/volume_id/linux_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/linux_swap.c (renamed from extras/volume_id/volume_id/linux_swap.c)1
-rw-r--r--extras/volume_id/libvolume_id/logging.h (renamed from extras/volume_id/volume_id/logging.h)0
-rw-r--r--extras/volume_id/libvolume_id/lsi_raid.c (renamed from extras/volume_id/volume_id/lsi_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/luks.c (renamed from extras/volume_id/volume_id/luks.c)1
-rw-r--r--extras/volume_id/libvolume_id/lvm.c (renamed from extras/volume_id/volume_id/lvm.c)1
-rw-r--r--extras/volume_id/libvolume_id/mac.c (renamed from extras/volume_id/volume_id/mac.c)1
-rw-r--r--extras/volume_id/libvolume_id/minix.c (renamed from extras/volume_id/volume_id/minix.c)1
-rw-r--r--extras/volume_id/libvolume_id/msdos.c (renamed from extras/volume_id/volume_id/msdos.c)1
-rw-r--r--extras/volume_id/libvolume_id/ntfs.c (renamed from extras/volume_id/volume_id/ntfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/nvidia_raid.c (renamed from extras/volume_id/volume_id/nvidia_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/ocfs.c (renamed from extras/volume_id/volume_id/ocfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/promise_raid.c (renamed from extras/volume_id/volume_id/promise_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/reiserfs.c (renamed from extras/volume_id/volume_id/reiserfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/romfs.c (renamed from extras/volume_id/volume_id/romfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/silicon_raid.c (renamed from extras/volume_id/volume_id/silicon_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/sysv.c (renamed from extras/volume_id/volume_id/sysv.c)1
-rw-r--r--extras/volume_id/libvolume_id/udf.c (renamed from extras/volume_id/volume_id/udf.c)1
-rw-r--r--extras/volume_id/libvolume_id/ufs.c (renamed from extras/volume_id/volume_id/ufs.c)1
-rw-r--r--extras/volume_id/libvolume_id/util.c (renamed from extras/volume_id/volume_id/util.c)0
-rw-r--r--extras/volume_id/libvolume_id/util.h (renamed from extras/volume_id/volume_id/util.h)0
-rw-r--r--extras/volume_id/libvolume_id/via_raid.c (renamed from extras/volume_id/volume_id/via_raid.c)1
-rw-r--r--extras/volume_id/libvolume_id/volume_id.c (renamed from extras/volume_id/volume_id/volume_id.c)52
-rw-r--r--extras/volume_id/libvolume_id/volume_id.h116
-rw-r--r--extras/volume_id/libvolume_id/vxfs.c (renamed from extras/volume_id/volume_id/vxfs.c)1
-rw-r--r--extras/volume_id/libvolume_id/xfs.c (renamed from extras/volume_id/volume_id/xfs.c)1
-rw-r--r--extras/volume_id/vol_id.c2
-rw-r--r--extras/volume_id/volume_id/Makefile.inc66
-rw-r--r--extras/volume_id/volume_id/cramfs.h16
-rw-r--r--extras/volume_id/volume_id/ext.h16
-rw-r--r--extras/volume_id/volume_id/fat.h16
-rw-r--r--extras/volume_id/volume_id/hfs.h16
-rw-r--r--extras/volume_id/volume_id/highpoint.h17
-rw-r--r--extras/volume_id/volume_id/hpfs.h16
-rw-r--r--extras/volume_id/volume_id/iso9660.h16
-rw-r--r--extras/volume_id/volume_id/isw_raid.h16
-rw-r--r--extras/volume_id/volume_id/jfs.h16
-rw-r--r--extras/volume_id/volume_id/linux_raid.h16
-rw-r--r--extras/volume_id/volume_id/linux_swap.h16
-rw-r--r--extras/volume_id/volume_id/lsi_raid.h16
-rw-r--r--extras/volume_id/volume_id/luks.h16
-rw-r--r--extras/volume_id/volume_id/lvm.h17
-rw-r--r--extras/volume_id/volume_id/mac.h16
-rw-r--r--extras/volume_id/volume_id/minix.h16
-rw-r--r--extras/volume_id/volume_id/msdos.h16
-rw-r--r--extras/volume_id/volume_id/ntfs.h16
-rw-r--r--extras/volume_id/volume_id/nvidia_raid.h16
-rw-r--r--extras/volume_id/volume_id/ocfs.h18
-rw-r--r--extras/volume_id/volume_id/promise_raid.h16
-rw-r--r--extras/volume_id/volume_id/reiserfs.h16
-rw-r--r--extras/volume_id/volume_id/romfs.h16
-rw-r--r--extras/volume_id/volume_id/silicon_raid.h16
-rw-r--r--extras/volume_id/volume_id/sysv.h16
-rw-r--r--extras/volume_id/volume_id/udf.h16
-rw-r--r--extras/volume_id/volume_id/ufs.h16
-rw-r--r--extras/volume_id/volume_id/via_raid.h16
-rw-r--r--extras/volume_id/volume_id/volume_id.h74
-rw-r--r--extras/volume_id/volume_id/vxfs.h16
-rw-r--r--extras/volume_id/volume_id/xfs.h16
70 files changed, 190 insertions, 714 deletions
diff --git a/extras/volume_id/Makefile b/extras/volume_id/Makefile
index 23de2ba091..30c0abb9a4 100644
--- a/extras/volume_id/Makefile
+++ b/extras/volume_id/Makefile
@@ -5,12 +5,8 @@
# Released under the GNU General Public License, version 2.
#
-VOLUME_ID_BASE=volume_id
-include $(VOLUME_ID_BASE)/Makefile.inc
-
PROG = vol_id
-OBJS = $(VOLUME_ID_OBJS)
-HEADERS = $(VOLUME_ID_HEADERS)
+LIBVOLUME_ID = libvolume_id/libvolume_id.a
GEN_HEADERS =
MAN_PAGES =
@@ -36,8 +32,11 @@ all: $(PROG) $(MAN_PAGES)
%.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
@@ -49,6 +48,7 @@ endif
clean:
rm -f $(PROG) $(OBJS) $(GEN_HEADERS)
+ $(MAKE) -C libvolume_id clean
.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
index 0000000000..02c24eae05
--- /dev/null
+++ b/extras/volume_id/libvolume_id/Makefile
@@ -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
+
diff --git a/extras/volume_id/volume_id/cramfs.c b/extras/volume_id/libvolume_id/cramfs.c
index 85a1bc8c55..0ad5886b32 100644
--- a/extras/volume_id/volume_id/cramfs.c
+++ b/extras/volume_id/libvolume_id/cramfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "cramfs.h"
struct cramfs_super {
uint8_t magic[4];
diff --git a/extras/volume_id/volume_id/ext.c b/extras/volume_id/libvolume_id/ext.c
index a3e20d3151..d1f62dfb6f 100644
--- a/extras/volume_id/volume_id/ext.c
+++ b/extras/volume_id/libvolume_id/ext.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "util.h"
#include "logging.h"
-#include "ext.h"
struct ext2_super_block {
uint32_t s_inodes_count;
diff --git a/extras/volume_id/volume_id/fat.c b/extras/volume_id/libvolume_id/fat.c
index 74f2bb9194..26d0fe74ab 100644
--- a/extras/volume_id/volume_id/fat.c
+++ b/extras/volume_id/libvolume_id/fat.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "fat.h"
#define FAT12_MAX 0xff5
#define FAT16_MAX 0xfff5
diff --git a/extras/volume_id/volume_id/hfs.c b/extras/volume_id/libvolume_id/hfs.c
index 8de8b9aaac..27a8ac9999 100644
--- a/extras/volume_id/volume_id/hfs.c
+++ b/extras/volume_id/libvolume_id/hfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "hfs.h"
struct hfs_finder_info{
uint32_t boot_folder;
diff --git a/extras/volume_id/volume_id/highpoint.c b/extras/volume_id/libvolume_id/highpoint.c
index 33c4a8c9c0..721b7ab26f 100644
--- a/extras/volume_id/volume_id/highpoint.c
+++ b/extras/volume_id/libvolume_id/highpoint.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "highpoint.h"
struct hpt37x_meta {
uint8_t filler1[32];
diff --git a/extras/volume_id/volume_id/hpfs.c b/extras/volume_id/libvolume_id/hpfs.c
index 3b97d9339d..52cb47be39 100644
--- a/extras/volume_id/volume_id/hpfs.c
+++ b/extras/volume_id/libvolume_id/hpfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "hpfs.h"
struct hpfs_super
{
diff --git a/extras/volume_id/volume_id/iso9660.c b/extras/volume_id/libvolume_id/iso9660.c
index 3999a1e7bf..b6654cecf2 100644
--- a/extras/volume_id/volume_id/iso9660.c
+++ b/extras/volume_id/libvolume_id/iso9660.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "iso9660.h"
#define ISO_SUPERBLOCK_OFFSET 0x8000
#define ISO_SECTOR_SIZE 0x800
diff --git a/extras/volume_id/volume_id/isw_raid.c b/extras/volume_id/libvolume_id/isw_raid.c
index 745b42f2d1..1f49959ff9 100644
--- a/extras/volume_id/volume_id/isw_raid.c
+++ b/extras/volume_id/libvolume_id/isw_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "isw_raid.h"
struct isw_meta {
uint8_t sig[32];
diff --git a/extras/volume_id/volume_id/jfs.c b/extras/volume_id/libvolume_id/jfs.c
index 1b2bfdf0e9..b6ae9624d6 100644
--- a/extras/volume_id/volume_id/jfs.c
+++ b/extras/volume_id/libvolume_id/jfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "jfs.h"
struct jfs_super_block {
uint8_t magic[4];
diff --git a/extras/volume_id/volume_id/linux_raid.c b/extras/volume_id/libvolume_id/linux_raid.c
index eb37dba367..d90510a817 100644
--- a/extras/volume_id/volume_id/linux_raid.c
+++ b/extras/volume_id/libvolume_id/linux_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "linux_raid.h"
struct mdp_super_block {
uint32_t md_magic;
diff --git a/extras/volume_id/volume_id/linux_swap.c b/extras/volume_id/libvolume_id/linux_swap.c
index b3e22f6db2..18928b8351 100644
--- a/extras/volume_id/volume_id/linux_swap.c
+++ b/extras/volume_id/libvolume_id/linux_swap.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "linux_swap.h"
struct swap_header_v1_2 {
uint8_t bootbits[1024];
diff --git a/extras/volume_id/volume_id/logging.h b/extras/volume_id/libvolume_id/logging.h
index 4a8aa50d4c..4a8aa50d4c 100644
--- a/extras/volume_id/volume_id/logging.h
+++ b/extras/volume_id/libvolume_id/logging.h
diff --git a/extras/volume_id/volume_id/lsi_raid.c b/extras/volume_id/libvolume_id/lsi_raid.c
index e5da281203..2720de763d 100644
--- a/extras/volume_id/volume_id/lsi_raid.c
+++ b/extras/volume_id/libvolume_id/lsi_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "lsi_raid.h"
struct lsi_meta {
uint8_t sig[6];
diff --git a/extras/volume_id/volume_id/luks.c b/extras/volume_id/libvolume_id/luks.c
index ff90f5d3d1..43f326e176 100644
--- a/extras/volume_id/volume_id/luks.c
+++ b/extras/volume_id/libvolume_id/luks.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "util.h"
#include "logging.h"
-#include "luks.h"
#define SECTOR_SHIFT 9
#define SECTOR_SIZE (1 << SECTOR_SHIFT)
diff --git a/extras/volume_id/volume_id/lvm.c b/extras/volume_id/libvolume_id/lvm.c
index a188402da8..650986256d 100644
--- a/extras/volume_id/volume_id/lvm.c
+++ b/extras/volume_id/libvolume_id/lvm.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "lvm.h"
struct lvm1_super_block {
uint8_t id[2];
diff --git a/extras/volume_id/volume_id/mac.c b/extras/volume_id/libvolume_id/mac.c
index 1587f48823..99bcbde6be 100644
--- a/extras/volume_id/volume_id/mac.c
+++ b/extras/volume_id/libvolume_id/mac.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "mac.h"
struct mac_driver_desc {
uint8_t signature[2];
diff --git a/extras/volume_id/volume_id/minix.c b/extras/volume_id/libvolume_id/minix.c
index b081afab49..ca57745f78 100644
--- a/extras/volume_id/volume_id/minix.c
+++ b/extras/volume_id/libvolume_id/minix.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "minix.h"
struct minix_super_block
{
diff --git a/extras/volume_id/volume_id/msdos.c b/extras/volume_id/libvolume_id/msdos.c
index ab18fc3585..a66046052a 100644
--- a/extras/volume_id/volume_id/msdos.c
+++ b/extras/volume_id/libvolume_id/msdos.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "msdos.h"
struct msdos_partition_entry {
uint8_t boot_ind;
diff --git a/extras/volume_id/volume_id/ntfs.c b/extras/volume_id/libvolume_id/ntfs.c
index 39aa2d73c6..de9ad6d654 100644
--- a/extras/volume_id/volume_id/ntfs.c
+++ b/extras/volume_id/libvolume_id/ntfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "ntfs.h"
struct ntfs_super_block {
uint8_t jump[3];
diff --git a/extras/volume_id/volume_id/nvidia_raid.c b/extras/volume_id/libvolume_id/nvidia_raid.c
index 9198f1e067..3b967e6979 100644
--- a/extras/volume_id/volume_id/nvidia_raid.c
+++ b/extras/volume_id/libvolume_id/nvidia_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "nvidia_raid.h"
struct nvidia_meta {
uint8_t vendor[8];
diff --git a/extras/volume_id/volume_id/ocfs.c b/extras/volume_id/libvolume_id/ocfs.c
index 88064ed193..faf89bd3e0 100644
--- a/extras/volume_id/volume_id/ocfs.c
+++ b/extras/volume_id/libvolume_id/ocfs.c
@@ -27,7 +27,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "ocfs.h"
struct ocfs1_super_block_header {
diff --git a/extras/volume_id/volume_id/promise_raid.c b/extras/volume_id/libvolume_id/promise_raid.c
index 54832a888a..6611aeab32 100644
--- a/extras/volume_id/volume_id/promise_raid.c
+++ b/extras/volume_id/libvolume_id/promise_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "promise_raid.h"
struct promise_meta {
uint8_t sig[24];
diff --git a/extras/volume_id/volume_id/reiserfs.c b/extras/volume_id/libvolume_id/reiserfs.c
index e64b08acdd..0eecbda5cb 100644
--- a/extras/volume_id/volume_id/reiserfs.c
+++ b/extras/volume_id/libvolume_id/reiserfs.c
@@ -27,7 +27,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "reiserfs.h"
struct reiserfs_super_block {
uint32_t blocks_count;
diff --git a/extras/volume_id/volume_id/romfs.c b/extras/volume_id/libvolume_id/romfs.c
index 3373f36497..51ef3739b3 100644
--- a/extras/volume_id/volume_id/romfs.c
+++ b/extras/volume_id/libvolume_id/romfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "romfs.h"
struct romfs_super {
uint8_t magic[8];
diff --git a/extras/volume_id/volume_id/silicon_raid.c b/extras/volume_id/libvolume_id/silicon_raid.c
index 5f68127c4f..a307764730 100644
--- a/extras/volume_id/volume_id/silicon_raid.c
+++ b/extras/volume_id/libvolume_id/silicon_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "silicon_raid.h"
struct silicon_meta {
uint8_t unknown0[0x2E];
diff --git a/extras/volume_id/volume_id/sysv.c b/extras/volume_id/libvolume_id/sysv.c
index 610edb8876..fc874d5bea 100644
--- a/extras/volume_id/volume_id/sysv.c
+++ b/extras/volume_id/libvolume_id/sysv.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "sysv.h"
#define SYSV_NICINOD 100
#define SYSV_NICFREE 50
diff --git a/extras/volume_id/volume_id/udf.c b/extras/volume_id/libvolume_id/udf.c
index f54ca87c8f..fede1ce68a 100644
--- a/extras/volume_id/volume_id/udf.c
+++ b/extras/volume_id/libvolume_id/udf.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "udf.h"
struct volume_descriptor {
struct descriptor_tag {
diff --git a/extras/volume_id/volume_id/ufs.c b/extras/volume_id/libvolume_id/ufs.c
index a7bd091c5e..ace61db657 100644
--- a/extras/volume_id/volume_id/ufs.c
+++ b/extras/volume_id/libvolume_id/ufs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "ufs.h"
struct ufs_super_block {
uint32_t fs_link;
diff --git a/extras/volume_id/volume_id/util.c b/extras/volume_id/libvolume_id/util.c
index 361d7058d0..361d7058d0 100644
--- a/extras/volume_id/volume_id/util.c
+++ b/extras/volume_id/libvolume_id/util.c
diff --git a/extras/volume_id/volume_id/util.h b/extras/volume_id/libvolume_id/util.h
index 6e16491c80..6e16491c80 100644
--- a/extras/volume_id/volume_id/util.h
+++ b/extras/volume_id/libvolume_id/util.h
diff --git a/extras/volume_id/volume_id/via_raid.c b/extras/volume_id/libvolume_id/via_raid.c
index 2b74123016..66962cd7f0 100644
--- a/extras/volume_id/volume_id/via_raid.c
+++ b/extras/volume_id/libvolume_id/via_raid.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "via_raid.h"
struct via_meta {
uint16_t signature;
diff --git a/extras/volume_id/volume_id/volume_id.c b/extras/volume_id/libvolume_id/volume_id.c
index b92269863f..09d1e31725 100644
--- a/extras/volume_id/volume_id/volume_id.c
+++ b/extras/volume_id/libvolume_id/volume_id.c
@@ -30,36 +30,6 @@
#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)
{
@@ -213,28 +183,6 @@ struct volume_id *volume_id_open_node(const char *path)
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)
diff --git a/extras/volume_id/libvolume_id/volume_id.h b/extras/volume_id/libvolume_id/volume_id.h
new file mode 100644
index 0000000000..f2f3a0d006
--- /dev/null
+++ b/extras/volume_id/libvolume_id/volume_id.h
@@ -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
diff --git a/extras/volume_id/volume_id/vxfs.c b/extras/volume_id/libvolume_id/vxfs.c
index c4a9ace98f..0aef369899 100644
--- a/extras/volume_id/volume_id/vxfs.c
+++ b/extras/volume_id/libvolume_id/vxfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "vxfs.h"
#define VXFS_SUPER_MAGIC 0xa501FCF5
diff --git a/extras/volume_id/volume_id/xfs.c b/extras/volume_id/libvolume_id/xfs.c
index 7fd629099d..a5f5d8432c 100644
--- a/extras/volume_id/volume_id/xfs.c
+++ b/extras/volume_id/libvolume_id/xfs.c
@@ -26,7 +26,6 @@
#include "volume_id.h"
#include "logging.h"
#include "util.h"
-#include "xfs.h"
struct xfs_super_block {
uint8_t magic[4];
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c
index 2b53085c72..6f99c52728 100644
--- a/extras/volume_id/vol_id.c
+++ b/extras/volume_id/vol_id.c
@@ -31,7 +31,7 @@
#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)
diff --git a/extras/volume_id/volume_id/Makefile.inc b/extras/volume_id/volume_id/Makefile.inc
deleted file mode 100644
index 6f8dceea4a..0000000000
--- a/extras/volume_id/volume_id/Makefile.inc
+++ /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
index 0ff19c342e..0000000000
--- a/extras/volume_id/volume_id/cramfs.h
+++ /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
index dfda2074b8..0000000000
--- a/extras/volume_id/volume_id/ext.h
+++ /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
index 92fa953b11..0000000000
--- a/extras/volume_id/volume_id/fat.h
+++ /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
index 4f732b6726..0000000000
--- a/extras/volume_id/volume_id/hfs.h
+++ /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
index f04d5f1685..0000000000
--- a/extras/volume_id/volume_id/highpoint.h
+++ /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
index d33e43a114..0000000000
--- a/extras/volume_id/volume_id/hpfs.h
+++ /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
index c407d416a2..0000000000
--- a/extras/volume_id/volume_id/iso9660.h
+++ /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
index 55d8c49268..0000000000
--- a/extras/volume_id/volume_id/isw_raid.h
+++ /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
index 4ef0d8763c..0000000000
--- a/extras/volume_id/volume_id/jfs.h
+++ /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
index 8fdeebf5cd..0000000000
--- a/extras/volume_id/volume_id/linux_raid.h
+++ /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
index e31ee6eb90..0000000000
--- a/extras/volume_id/volume_id/linux_swap.h
+++ /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
index 51a0bfbcc6..0000000000
--- a/extras/volume_id/volume_id/lsi_raid.h
+++ /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
index fbf3fcd846..0000000000
--- a/extras/volume_id/volume_id/luks.h
+++ /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
index d07cb53af6..0000000000
--- a/extras/volume_id/volume_id/lvm.h
+++ /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
index 77b8ccda6f..0000000000
--- a/extras/volume_id/volume_id/mac.h
+++ /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
index 3020cc0464..0000000000
--- a/extras/volume_id/volume_id/minix.h
+++ /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
index b319f05d63..0000000000
--- a/extras/volume_id/volume_id/msdos.h
+++ /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
index 8d59159685..0000000000
--- a/extras/volume_id/volume_id/ntfs.h
+++ /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
index 80c51692aa..0000000000
--- a/extras/volume_id/volume_id/nvidia_raid.h
+++ /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
index 9d46b28dcd..0000000000
--- a/extras/volume_id/volume_id/ocfs.h
+++ /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
index a46b062015..0000000000
--- a/extras/volume_id/volume_id/promise_raid.h
+++ /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
index 57ee05ea2e..0000000000
--- a/extras/volume_id/volume_id/reiserfs.h
+++ /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
index 5fe56dcdfe..0000000000
--- a/extras/volume_id/volume_id/romfs.h
+++ /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
index f80c1a4a3f..0000000000
--- a/extras/volume_id/volume_id/silicon_raid.h
+++ /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
index b8c369ec08..0000000000
--- a/extras/volume_id/volume_id/sysv.h
+++ /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
index ff95cc1058..0000000000
--- a/extras/volume_id/volume_id/udf.h
+++ /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
index ae46a924b4..0000000000
--- a/extras/volume_id/volume_id/ufs.h
+++ /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
index 3eeaa2cee3..0000000000
--- a/extras/volume_id/volume_id/via_raid.h
+++ /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
index 9994615c69..0000000000
--- a/extras/volume_id/volume_id/volume_id.h
+++ /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
index 8ca45c3fdc..0000000000
--- a/extras/volume_id/volume_id/vxfs.h
+++ /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
index f21cc5f929..0000000000
--- a/extras/volume_id/volume_id/xfs.h
+++ /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