Bugfix: directories: not reported as such on case-insensitive fs
Bugfix. Patch attached
Vladimir 'phcoder' Serbinenko
hfsplus.c +2 -2
@@ -899,8 +899,8 @@ grub_fshelp_node_t node) {grub_free (node); - -if (filetype ==GRUB_FSHELP_DIR ) + +if ((filetype &GRUB_FSHELP_TYPE_MASK ) ==GRUB_FSHELP_DIR )return hook (filename,1 );else return hook (filename,0 );
ChangeLog +8 -0
@@ -1,0 +1,8 @@ +2009-02-09 Vladimir Serbinenko <[email protected]> + + Bugfix: directories not reported as such on case-insensitive hfs+ + + * include/grub/fshelp.h: included definition of GRUB_FSHELP_TYPE_MASK + and GRUB_FSHELP_FLAGS_MASK + * fs/hfsplus.c (grub_hfsplus_dir): ignore filetype flags +
grub/fshelp.h +2 -0
@@ -27,6 +27,8 @@typedef struct grub_fshelp_node *grub_fshelp_node_t ;#define GRUB_FSHELP_CASE_INSENSITIVE 0x100 +#define GRUB_FSHELP_TYPE_MASK 0xff +#define GRUB_FSHELP_FLAGS_MASK 0x100enum grub_fshelp_filetype {
hfsplus.c line 903
Quoted 4 lines · phcoder
hfsplus.c +2
-2- -if (filetype ==GRUB_FSHELP_DIR ) + +if ((filetype &GRUB_FSHELP_TYPE_MASK ) ==GRUB_FSHELP_DIR )
Please don't remove those spaces, they're intentional (see
http://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting)
ChangeLog line 6
Quoted 2 lines
ChangeLog +2
-0+ * include/grub/fshelp.h: included definition of GRUB_FSHELP_TYPE_MASK + and GRUB_FSHELP_FLAGS_MASK
This should be something like:
* file (macro1, macro2): Define.
or similar.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
hfsplus.c line 903
Quoted 2 lines · phcoder
hfsplus.c +1
-1-if (filetype ==GRUB_FSHELP_DIR ) +if ((filetype &GRUB_FSHELP_TYPE_MASK ) ==GRUB_FSHELP_DIR )
Uhm actually I don't understand why you need a mask for this. filetype is an enum, which we define ourselves. What's the root of the problem?
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 7 lines · Robert Millan
hfsplus.c line 903
Quoted 2 lines · phcoder
hfsplus.c +1
-1-if (filetype ==GRUB_FSHELP_DIR ) +if ((filetype &GRUB_FSHELP_TYPE_MASK ) ==GRUB_FSHELP_DIR )Uhm actually I don't understand why you need a mask for this. filetype is an enum, which we define ourselves. What's the root of the problem?
The usage of
#define GRUB_FSHELP_CASE_INSENSITIVE 0x100
as a flag on filetype
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko