mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
udev: fix vol_id ext4 detection if it has no journal.
This commit is contained in:
50
src/patches/udev-125-ext4_wo_journal.patch
Normal file
50
src/patches/udev-125-ext4_wo_journal.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
diff -Naur udev-125.org/extras/volume_id/lib/ext.c udev-125/extras/volume_id/lib/ext.c
|
||||
--- udev-125.org/extras/volume_id/lib/ext.c 2008-07-18 16:26:55.000000000 +0200
|
||||
+++ udev-125/extras/volume_id/lib/ext.c 2012-06-25 00:52:40.976563010 +0200
|
||||
@@ -160,32 +160,31 @@
|
||||
goto found;
|
||||
}
|
||||
|
||||
- /* has journal */
|
||||
- if ((feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0) {
|
||||
- /* "use on development code" is ext4dev */
|
||||
- if ((flags & EXT2_FLAGS_TEST_FILESYS) != 0) {
|
||||
- id->type = "ext4dev";
|
||||
- goto found;
|
||||
- }
|
||||
+ /* "use on development code" is ext4dev */
|
||||
+ if ((flags & EXT2_FLAGS_TEST_FILESYS) != 0) {
|
||||
+ id->type = "ext4dev";
|
||||
+ goto found;
|
||||
+ }
|
||||
|
||||
- /* incompatible ext3 features is ext4 */
|
||||
- if ((feature_ro_compat & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) != 0 ||
|
||||
- (feature_incompat & EXT3_FEATURE_INCOMPAT_UNSUPPORTED) != 0) {
|
||||
- id->type = "ext4";
|
||||
- goto found;
|
||||
- }
|
||||
+ /* incompatible ext3 features is ext4 */
|
||||
+ if ((feature_ro_compat & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) != 0 ||
|
||||
+ (feature_incompat & EXT3_FEATURE_INCOMPAT_UNSUPPORTED) != 0) {
|
||||
+ id->type = "ext4";
|
||||
+ goto found;
|
||||
+ }
|
||||
|
||||
+ /* has journal */
|
||||
+ if ((feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) != 0) {
|
||||
id->type = "ext3";
|
||||
goto found;
|
||||
} else {
|
||||
- /* no incompatible ext2 feature is ext2 */
|
||||
+ /* no incompatible ext2 feature is ext2 */
|
||||
if ((feature_ro_compat & EXT2_FEATURE_RO_COMPAT_UNSUPPORTED) == 0 &&
|
||||
(feature_incompat & EXT2_FEATURE_INCOMPAT_UNSUPPORTED) == 0) {
|
||||
id->type = "ext2";
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
-
|
||||
return -1;
|
||||
|
||||
found:
|
||||
Reference in New Issue
Block a user