@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
103
103
#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
104
104
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
105
105
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
106
+ #define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
106
107
#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
107
108
108
109
/* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -123,9 +124,16 @@ GRUB_MOD_LICENSE ("GPLv3+");
123
124
* mmp: Not really back-incompatible - was added as such to
124
125
* avoid multiple read-write mounts. Safe to ignore for this
125
126
* RO driver.
127
+ * checksum seed: Not really back-incompatible - was added to allow tools
128
+ * such as tune2fs to change the UUID on a mounted metadata
129
+ * checksummed filesystem. Safe to ignore for now since the
130
+ * driver doesn't support checksum verification. But it must
131
+ * be removed from this list if that support is added later.
132
+ *
126
133
*/
127
134
#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
128
- | EXT4_FEATURE_INCOMPAT_MMP)
135
+ | EXT4_FEATURE_INCOMPAT_MMP \
136
+ | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
129
137
130
138
131
139
#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
@@ -723,10 +731,11 @@ grub_ext2_read_symlink (grub_fshelp_node_t node)
723
731
if (! symlink )
724
732
return 0 ;
725
733
726
- /* If the filesize of the symlink is bigger than
727
- 60 the symlink is stored in a separate block,
728
- otherwise it is stored in the inode. */
729
- if (grub_le_to_cpu32 (diro -> inode .size ) <= sizeof (diro -> inode .symlink ))
734
+ /*
735
+ * If the filesize of the symlink is equal to or bigger than 60 the symlink
736
+ * is stored in a separate block, otherwise it is stored in the inode.
737
+ */
738
+ if (grub_le_to_cpu32 (diro -> inode .size ) < sizeof (diro -> inode .symlink ))
730
739
grub_memcpy (symlink ,
731
740
diro -> inode .symlink ,
732
741
grub_le_to_cpu32 (diro -> inode .size ));
0 commit comments