All of lore.kernel.org
 help / color / mirror / Atom feed
* Bugfix: directories: not reported as such on case-insensitive fs
@ 2009-02-09 16:16 phcoder
  2009-03-13 19:31 ` Robert Millan
  2009-03-13 19:32 ` Robert Millan
  0 siblings, 2 replies; 4+ messages in thread
From: phcoder @ 2009-02-09 16:16 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 53 bytes --]

Bugfix. Patch attached
Vladimir 'phcoder' Serbinenko

[-- Attachment #2: hfspbf.diff --]
[-- Type: text/x-diff, Size: 1277 bytes --]

Index: fs/hfsplus.c
===================================================================
--- fs/hfsplus.c	(revision 1985)
+++ fs/hfsplus.c	(working copy)
@@ -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);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1985)
+++ ChangeLog	(working copy)
@@ -1,0 +1,8 @@
+2009-02-09  Vladimir Serbinenko  <phcoder@gmail.com>
+
+	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
+
Index: include/grub/fshelp.h
===================================================================
--- include/grub/fshelp.h	(revision 1985)
+++ include/grub/fshelp.h	(working copy)
@@ -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	0x100
 
 enum grub_fshelp_filetype
   {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bugfix: directories: not reported as such on case-insensitive fs
  2009-02-09 16:16 Bugfix: directories: not reported as such on case-insensitive fs phcoder
@ 2009-03-13 19:31 ` Robert Millan
  2009-03-13 19:32 ` Robert Millan
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Millan @ 2009-03-13 19:31 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Feb 09, 2009 at 05:16:52PM +0100, phcoder wrote:
> -      
> -      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)

> +	* 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.

-- 
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."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bugfix: directories: not reported as such on case-insensitive fs
  2009-02-09 16:16 Bugfix: directories: not reported as such on case-insensitive fs phcoder
  2009-03-13 19:31 ` Robert Millan
@ 2009-03-13 19:32 ` Robert Millan
  2009-03-13 20:42   ` phcoder
  1 sibling, 1 reply; 4+ messages in thread
From: Robert Millan @ 2009-03-13 19:32 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Feb 09, 2009 at 05:16:52PM +0100, phcoder wrote:
> -      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?

-- 
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."



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bugfix: directories: not reported as such on case-insensitive fs
  2009-03-13 19:32 ` Robert Millan
@ 2009-03-13 20:42   ` phcoder
  0 siblings, 0 replies; 4+ messages in thread
From: phcoder @ 2009-03-13 20:42 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan wrote:
> On Mon, Feb 09, 2009 at 05:16:52PM +0100, phcoder wrote:
>> -      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

-- 

Regards
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-13 20:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 16:16 Bugfix: directories: not reported as such on case-insensitive fs phcoder
2009-03-13 19:31 ` Robert Millan
2009-03-13 19:32 ` Robert Millan
2009-03-13 20:42   ` phcoder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.