mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-24 16:19:22 +00:00
* grub-core/fs/ufs.c (grub_ufs_find_file): Fix handling of double slash.
* grub-core/fs/minix.c (grub_minix_find_file): Likewise.
This commit is contained in:
1 parent
8aeb18379b
commit
3244fe96e7
3 files changed
+15
-6
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2012-05-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/ufs.c (grub_ufs_find_file): Fix handling of double slash.
|
||||||
|
* grub-core/fs/minix.c (grub_minix_find_file): Likewise.
|
||||||
|
|
||||||
2012-05-10 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-05-10 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub-menulst2cfg.c (main): Check return value of fwrite.
|
* util/grub-menulst2cfg.c (main): Check return value of fwrite.
|
||||||
|
|||||||
@@ -386,12 +386,10 @@ grub_minix_find_file (struct grub_minix_data *data, const char *path)
|
|||||||
grub_strcpy (fpath, path);
|
grub_strcpy (fpath, path);
|
||||||
|
|
||||||
/* Skip the first slash. */
|
/* Skip the first slash. */
|
||||||
if (name[0] == '/')
|
while (*name == '/')
|
||||||
{
|
|
||||||
name++;
|
name++;
|
||||||
if (!*name)
|
if (!*name)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* Extract the actual part from the pathname. */
|
/* Extract the actual part from the pathname. */
|
||||||
next = grub_strchr (name, '/');
|
next = grub_strchr (name, '/');
|
||||||
@@ -399,6 +397,8 @@ grub_minix_find_file (struct grub_minix_data *data, const char *path)
|
|||||||
{
|
{
|
||||||
next[0] = '\0';
|
next[0] = '\0';
|
||||||
next++;
|
next++;
|
||||||
|
while (*next == '/')
|
||||||
|
next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -445,6 +445,8 @@ grub_minix_find_file (struct grub_minix_data *data, const char *path)
|
|||||||
{
|
{
|
||||||
next[0] = '\0';
|
next[0] = '\0';
|
||||||
next++;
|
next++;
|
||||||
|
while (*next == '/')
|
||||||
|
next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((GRUB_MINIX_INODE_MODE (data)
|
if ((GRUB_MINIX_INODE_MODE (data)
|
||||||
|
|||||||
+5
-3
@@ -471,12 +471,10 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
|
|||||||
grub_strcpy (fpath, path);
|
grub_strcpy (fpath, path);
|
||||||
|
|
||||||
/* Skip the first slash. */
|
/* Skip the first slash. */
|
||||||
if (name[0] == '/')
|
while (*name == '/')
|
||||||
{
|
|
||||||
name++;
|
name++;
|
||||||
if (!*name)
|
if (!*name)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* Extract the actual part from the pathname. */
|
/* Extract the actual part from the pathname. */
|
||||||
next = grub_strchr (name, '/');
|
next = grub_strchr (name, '/');
|
||||||
@@ -484,6 +482,8 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
|
|||||||
{
|
{
|
||||||
next[0] = '\0';
|
next[0] = '\0';
|
||||||
next++;
|
next++;
|
||||||
|
while (*next == '/')
|
||||||
|
next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -536,6 +536,8 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
|
|||||||
{
|
{
|
||||||
next[0] = '\0';
|
next[0] = '\0';
|
||||||
next++;
|
next++;
|
||||||
|
while (*next == '/')
|
||||||
|
next++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((INODE_MODE(data) & GRUB_UFS_ATTR_TYPE) != GRUB_UFS_ATTR_DIR)
|
if ((INODE_MODE(data) & GRUB_UFS_ATTR_TYPE) != GRUB_UFS_ATTR_DIR)
|
||||||
|
|||||||
Reference in new issue
Block a user