Skip to contentSkip to conversation

export all supported filesystems

PATCH New Hannes Reinecke 1 participant 1 message Nov 10, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 export all supported filesystems

Hi Kay,

as we now have a libvolume_id it might actually be a good idea to tell others which filesystems we support, no?

Cheers,

Hannes

Signature · 4 lines
Dr. Hannes Reinecke			[email protected]
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de
extras/volume_id/libvolume_id/cramfs.c +4 -0
@@ -42,6 +42,10 @@ struct cramfs_super {
 	uint8_t		name[16];
 } __attribute__((__packed__));
 
+char *volume_id_types_cramfs[] = {
+    "cramfs"
+};
+
 int volume_id_probe_cramfs(struct volume_id *id, uint64_t off)
 {
 	struct cramfs_super *cs;
extras/volume_id/libvolume_id/ext.c +4 -0
@@ -71,6 +71,10 @@ struct ext2_super_block {
 #define EXT3_MIN_BLOCK_SIZE			0x400
 #define EXT3_MAX_BLOCK_SIZE			0x1000
 
+char *volume_id_types_ext[] = {
+    "ext2", "ext3", "jbd"
+};
+
 int volume_id_probe_ext(struct volume_id *id, uint64_t off)
 {
 	struct ext2_super_block *es;
extras/volume_id/libvolume_id/fat.c +4 -0
@@ -125,6 +125,10 @@ static uint8_t *get_attr_volume_id(struc
 	return NULL;
 }
 
+char *volume_id_types_vfat[] = {
+    "vfat"
+};
+
 int volume_id_probe_vfat(struct volume_id *id, uint64_t off)
 {
 	struct vfat_super_block *vs;
extras/volume_id/libvolume_id/hfs.c +4 -0
@@ -138,6 +138,10 @@ struct hfsplus_vol_header {
 #define HFS_NODE_LEAF			0xff
 #define HFSPLUS_POR_CNID		1
 
+char *volume_id_types_hfs_hfsplus[] = {
+    "hfs", "hfsplus"
+};
+
 int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off)
 {
 	unsigned int blocksize;
extras/volume_id/libvolume_id/highpoint.c +0 -0
extras/volume_id/libvolume_id/hpfs.c +4 -0
@@ -35,6 +35,10 @@ struct hpfs_super
 
 #define HPFS_SUPERBLOCK_OFFSET			0x2000
 
+char *volume_id_types_hpfs[] = {
+    "hpfs"
+};
+
 int volume_id_probe_hpfs(struct volume_id *id, uint64_t off)
 {
 	struct hpfs_super *hs;
extras/volume_id/libvolume_id/iso9660.c +4 -0
@@ -54,6 +54,10 @@ struct high_sierra_volume_descriptor {
 	uint8_t		version;
 } __attribute__((__packed__));
 
+char *volume_id_types_iso9660[] = {
+    "iso9660"
+};
+
 int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
 {
 	uint8_t *buf;
extras/volume_id/libvolume_id/isw_raid.c +0 -0
extras/volume_id/libvolume_id/jfs.c +4 -0
@@ -42,6 +42,10 @@ struct jfs_super_block {
 
 #define JFS_SUPERBLOCK_OFFSET			0x8000
 
+char *volume_id_types_jfs[] = {
+    "jfs"
+};
+
 int volume_id_probe_jfs(struct volume_id *id, uint64_t off)
 {
 	struct jfs_super_block *js;
extras/volume_id/libvolume_id/minix.c +4 -0
@@ -43,6 +43,10 @@ struct minix_super_block
 
 #define MINIX_SUPERBLOCK_OFFSET			0x400
 
+char *volume_id_types_minix[] = {
+    "minix"
+};
+
 int volume_id_probe_minix(struct volume_id *id, uint64_t off)
 {
 	struct minix_super_block *ms;
extras/volume_id/libvolume_id/ntfs.c +4 -0
@@ -91,6 +91,10 @@ struct volume_info {
 #define MFT_RECORD_ATTR_OBJECT_ID		0x40
 #define MFT_RECORD_ATTR_END			0xffffffffu
 
+char *volume_id_types_ntfs[] = {
+    "ntfs"
+};
+
 int volume_id_probe_ntfs(struct volume_id *id, uint64_t off)
 {
 	unsigned int sector_size;
extras/volume_id/libvolume_id/ocfs.c +8 -0
@@ -127,6 +127,14 @@ struct ocfs2_super_block {
 	uint8_t		s_uuid[16];
 } __attribute__((__packed__));
 
+char *volume_id_types_ocfs1[] = {
+    "ocfs"
+};
+
+char *volume_id_types_ocfs2[] = {
+    "ocfs2"
+};
+
 int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off)
 {
 	const uint8_t *buf;
extras/volume_id/libvolume_id/reiserfs.c +4 -0
@@ -55,6 +55,10 @@ struct reiser4_super_block {
 #define REISERFS1_SUPERBLOCK_OFFSET		0x2000
 #define REISERFS_SUPERBLOCK_OFFSET		0x10000
 
+char *volume_id_types_reiserfs[] = {
+    "reiserfs", "reiser4",
+};
+
 int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off)
 {
 	struct reiserfs_super_block *rs;
extras/volume_id/libvolume_id/romfs.c +4 -0
@@ -34,6 +34,10 @@ struct romfs_super {
 	uint8_t name[0];
 } __attribute__((__packed__));
 
+char *volume_id_types_romfs[] = {
+    "romfs"
+};
+
 int volume_id_probe_romfs(struct volume_id *id, uint64_t off)
 {
 	struct romfs_super *rfs;
extras/volume_id/libvolume_id/sysv.c +4 -0
@@ -90,6 +90,10 @@ struct xenix_super {
 #define XENIX_MAGIC				0x2b5544
 #define SYSV_MAX_BLOCKSIZE			0x800
 
+char *volume_id_types_sysv[] = {
+    "xenix", "sysv",
+};
+
 int volume_id_probe_sysv(struct volume_id *id, uint64_t off)
 {
 	struct sysv_super *vs;
extras/volume_id/libvolume_id/udf.c +4 -0
@@ -62,6 +62,10 @@ struct volume_structure_descriptor {
 
 #define UDF_VSD_OFFSET			0x8000
 
+char *volume_id_types_udf[] = {
+    "udf"
+};
+
 int volume_id_probe_udf(struct volume_id *id, uint64_t off)
 {
 	struct volume_descriptor *vd;
extras/volume_id/libvolume_id/ufs.c +4 -0
@@ -169,6 +169,10 @@ struct ufs_super_block {
 #define UFS_MAGIC_FEA			0x00195612
 #define UFS_MAGIC_LFN			0x00095014
 
+char *volume_id_types_ufs[] = {
+    "ufs"
+};
+
 int volume_id_probe_ufs(struct volume_id *id, uint64_t off)
 {
 	uint32_t magic;
extras/volume_id/libvolume_id/volume_id.c +0 -1
@@ -30,7 +30,6 @@
 #include "logging.h"
 #include "util.h"
 
-
 int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size)
 {
 	if (id == NULL)
extras/volume_id/libvolume_id/volume_id.h +41 -0

68 lines not on this page · raw message

extras/volume_id/libvolume_id/vxfs.c +4 -0
@@ -34,6 +34,10 @@ struct vxfs_super {
 	int32_t			vs_version;
 } __attribute__((__packed__));
 
+char *volume_id_types_vxfs[] = {
+    "vxfs"
+};
+
 int volume_id_probe_vxfs(struct volume_id *id, uint64_t off)
 {
 	struct vxfs_super *vxs;
extras/volume_id/libvolume_id/xfs.c +4 -0
@@ -42,6 +42,10 @@ struct xfs_super_block {
 	uint64_t	fdblocks;
 } __attribute__((__packed__));
 
+char *volume_id_types_xfs[] = {
+    "xfs"
+};
+
 int volume_id_probe_xfs(struct volume_id *id, uint64_t off)
 {
 	struct xfs_super_block *xs;