bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minix files with MAXNAMELEN are not recognized by GRUB


From: Klaus Reichl
Subject: Minix files with MAXNAMELEN are not recognized by GRUB
Date: Thu, 17 Jan 2002 23:32:02 +0100

Hi all,

0.90 tests showed that `fsys_minix' has problems with filename len
equal to MAXNAMELEN.

If everybody agrees, I'll check it in.

KR
--
                                        email: address@hidden 
Klaus Reichl                                   address@hidden
Danhausergasse 8/16                     voice: +43 (1) 27722 / 3884 (job)    
A-1040 Wien                                    +43 (1)    94 137 94 (private)
                                               +43 (6991) 94 137 94 (mobile)

 

Testcase is:

Create a 14 character length file on a Minix-1 disk, try to get it
with GRUB.

Fix is trivial:

cvs diff -u ChangeLog stage2/fsys_minix.c 
Index: ChangeLog
===================================================================
RCS file: /cvsroot/grub/grub/ChangeLog,v
retrieving revision 1.463
diff -u -r1.463 ChangeLog
--- ChangeLog   15 Jan 2002 10:32:21 -0000      1.463
+++ ChangeLog   17 Jan 2002 22:23:41 -0000
@@ -11,6 +11,11 @@
 
        * docs/grub.texi: Added some text about JFS and XFS.
        
+2002-01-15  Klaus Reichl  <address@hidden>
+
+       * stage2/fsys_minix.c (minix_dir): Fixed bug getting filenames
+       with MAXNAMELEN right.
+
 2002-01-08  Yoshinori K. Okuji  <address@hidden>
 
        * grub/main.c (use_preset_menu): New variable.
Index: stage2/fsys_minix.c
===================================================================
RCS file: /cvsroot/grub/grub/stage2/fsys_minix.c,v
retrieving revision 1.7
diff -u -r1.7 fsys_minix.c
--- stage2/fsys_minix.c 2 Feb 2001 13:31:03 -0000       1.7
+++ stage2/fsys_minix.c 17 Jan 2002 22:10:53 -0000
@@ -504,9 +504,9 @@
 
          if (dp->inode)
            {
-             int saved_c = dp->name[namelen + 1];
+             int saved_c = dp->name[namelen];
 
-             dp->name[namelen+1] = 0;
+             dp->name[namelen] = 0;
              str_chk = substring (dirname, dp->name);
 
 # ifndef STAGE1_5
@@ -519,7 +519,7 @@
                }
 # endif
 
-             dp->name[namelen + 1] = saved_c;
+             dp->name[namelen] = saved_c;
            }
 
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]