From aa0e180dc2e552331be8d224e64539830c4b442e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 28 Mar 2007 22:30:07 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/e2fsprogs?expand=0&rev=6 --- e2fsprogs-blkid_probe_ext4.patch | 65 +++++++++++++++++++++++++++++ e2fsprogs-blkid_probe_hfsplus.patch | 12 ++++++ e2fsprogs.changes | 6 +++ e2fsprogs.spec | 11 ++++- 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 e2fsprogs-blkid_probe_ext4.patch create mode 100644 e2fsprogs-blkid_probe_hfsplus.patch diff --git a/e2fsprogs-blkid_probe_ext4.patch b/e2fsprogs-blkid_probe_ext4.patch new file mode 100644 index 0000000..1624535 --- /dev/null +++ b/e2fsprogs-blkid_probe_ext4.patch @@ -0,0 +1,65 @@ +Index: e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.c +=================================================================== +--- e2fsprogs-1.39+1.40_WIP_20061114.orig/lib/blkid/probe.c ++++ e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.c +@@ -148,6 +148,39 @@ static void get_ext2_info(blkid_dev dev, + set_uuid(dev, es->s_uuid, 0); + } + ++static int probe_ext4(struct blkid_probe *probe, ++ struct blkid_magic *id __BLKID_ATTR((unused)), ++ unsigned char *buf) ++{ ++ struct ext2_super_block *es; ++ es = (struct ext2_super_block *)buf; ++ ++ /* Distinguish between jbd and ext2/3 fs */ ++ if (blkid_le32(es->s_feature_incompat) & ++ EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) ++ return -BLKID_ERR_PARAM; ++ ++ /* Distinguish between ext3 and ext2 */ ++ if (!(blkid_le32(es->s_feature_compat) & ++ EXT3_FEATURE_COMPAT_HAS_JOURNAL)) ++ return -BLKID_ERR_PARAM; ++ ++ /* Distinguish between ext4 and ext3 */ ++ if (!(blkid_le32(es->s_feature_incompat) & ++ EXT3_FEATURE_INCOMPAT_EXTENTS)) ++ return -BLKID_ERR_PARAM; ++ ++ get_ext2_info(probe->dev, buf); ++ ++ if ((es->s_feature_incompat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) && ++ !uuid_is_null(es->s_journal_uuid)) ++ set_uuid(probe->dev, es->s_journal_uuid, "EXT_JOURNAL"); ++ ++ blkid_set_tag(probe->dev, "SEC_TYPE", "ext2", sizeof("ext2")); ++ ++ return 0; ++} ++ + static int probe_ext3(struct blkid_probe *probe, + struct blkid_magic *id __BLKID_ATTR((unused)), + unsigned char *buf) +@@ -710,6 +743,7 @@ static struct blkid_magic type_array[] = + /* type kboff sboff len magic probe */ + { "oracleasm", 0, 32, 8, "ORCLDISK", probe_oracleasm }, + { "ntfs", 0, 3, 8, "NTFS ", 0 }, ++ { "ext4dev", 1, 0x38, 2, "\123\357", probe_ext4 }, + { "jbd", 1, 0x38, 2, "\123\357", probe_jbd }, + { "ext3", 1, 0x38, 2, "\123\357", probe_ext3 }, + { "ext2", 1, 0x38, 2, "\123\357", probe_ext2 }, +Index: e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.h +=================================================================== +--- e2fsprogs-1.39+1.40_WIP_20061114.orig/lib/blkid/probe.h ++++ e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.h +@@ -87,6 +87,8 @@ struct ext2_super_block { + #define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004 + #define EXT3_FEATURE_INCOMPAT_RECOVER 0x00000004 + #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008 ++#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x00000040 ++ + + struct xfs_super_block { + unsigned char xs_magic[4]; diff --git a/e2fsprogs-blkid_probe_hfsplus.patch b/e2fsprogs-blkid_probe_hfsplus.patch new file mode 100644 index 0000000..ed58f3e --- /dev/null +++ b/e2fsprogs-blkid_probe_hfsplus.patch @@ -0,0 +1,12 @@ +Index: e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.c +=================================================================== +--- e2fsprogs-1.39+1.40_WIP_20061114.orig/lib/blkid/probe.c ++++ e2fsprogs-1.39+1.40_WIP_20061114/lib/blkid/probe.c +@@ -783,6 +783,7 @@ static struct blkid_magic type_array[] = + { "iso9660", 32, 9, 5, "CDROM", probe_iso9660 }, + { "jfs", 32, 0, 4, "JFS1", probe_jfs }, + { "hfs", 1, 0, 2, "BD", 0 }, ++ { "hfsplus", 1, 0, 2, "H+", 0 }, + { "ufs", 8, 0x55c, 4, "T\031\001\000", 0 }, + { "hpfs", 8, 0, 4, "I\350\225\371", 0 }, + { "sysv", 0, 0x3f8, 4, "\020~\030\375", 0 }, diff --git a/e2fsprogs.changes b/e2fsprogs.changes index c4b7757..b9655e5 100644 --- a/e2fsprogs.changes +++ b/e2fsprogs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 28 15:44:16 CEST 2007 - mkoenig@suse.de + +- blkid: add hfsplus volume detection (FATE#302071) +- blkid: add experimental detection of ext4dev (FATE#301897) + ------------------------------------------------------------------- Thu Jan 25 13:05:11 CET 2007 - mkoenig@suse.de diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 7e38231..2676e26 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -19,7 +19,7 @@ Obsoletes: ext2fs PreReq: %install_info_prereq Autoreqprov: on Version: 1.39+1.40_WIP_20061114 -Release: 3 +Release: 10 Summary: Utilities for the Second Extended File System URL: http://e2fsprogs.sourceforge.net Source: %{name}-%{version}.tar.bz2 @@ -42,6 +42,8 @@ Patch15: e2fsprogs-1.39-uuid_duplicates.patch Patch16: e2fsprogs-1.39-resize2fs_manpage.patch Patch17: e2fsprogs-strncat.patch Patch18: e2fsprogs-1.39-check_fs_open-in-dump_unused.patch +Patch19: e2fsprogs-blkid_probe_ext4.patch +Patch20: e2fsprogs-blkid_probe_hfsplus.patch # libcom_err patches Patch30: libcom_err-no-static-buffer.patch Patch31: libcom_err-no-init_error_table.patch @@ -118,6 +120,8 @@ Authors: %patch16 %patch17 -p1 %patch18 -p1 +%patch19 -p1 +%patch20 -p1 # libcom_err patches %patch30 -p1 %patch31 -p1 @@ -243,7 +247,10 @@ rm -rf $RPM_BUILD_ROOT %postun -n libcom_err -p /sbin/ldconfig -%changelog -n e2fsprogs +%changelog +* Wed Mar 28 2007 - mkoenig@suse.de +- blkid: add hfsplus volume detection (FATE#302071) +- blkid: add experimental detection of ext4dev (FATE#301897) * Thu Jan 25 2007 - mkoenig@suse.de - fix segfault in debugfs when using without open fs [#238140] * Mon Jan 22 2007 - mkoenig@suse.de