forked from pool/grub2
Jiri Slaby
618ccb4258
- add new patches for booting btrfs snapshot (fate#316522) (fate#316232) * 0001-btrfs-rename-skip_default-to-follow_default.patch * 0002-btrfs-add-ability-to-boot-from-subvolumes.patch * 0003-cmdline-add-envvar-loader_cmdline_append.patch * 0004-btrfs-export-subvolume-envvars.patch OBS-URL: https://build.opensuse.org/request/show/211329 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=60
86 lines
2.4 KiB
Diff
86 lines
2.4 KiB
Diff
From: Jeff Mahoney <jeffm@suse.com>
|
|
Subject: grub2/btrfs: rename skip_default to follow_default
|
|
|
|
The skip_default code in find_path uses 1 to indicate that the default
|
|
should not be skipped, which is confusing. Let's rename that to
|
|
follow_default.
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
---
|
|
grub-core/fs/btrfs.c | 20 ++++++++++----------
|
|
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
|
|
--- a/grub-core/fs/btrfs.c 2013-06-16 08:24:05.000000000 -0400
|
|
+++ b/grub-core/fs/btrfs.c 2013-07-29 09:26:07.421380716 -0400
|
|
@@ -1208,7 +1208,7 @@ find_path (struct grub_btrfs_data *data,
|
|
grub_size_t allocated = 0;
|
|
struct grub_btrfs_dir_item *direl = NULL;
|
|
struct grub_btrfs_key key_out;
|
|
- int skip_default;
|
|
+ int follow_default;
|
|
const char *ctoken;
|
|
grub_size_t ctokenlen;
|
|
char *path_alloc = NULL;
|
|
@@ -1220,14 +1220,14 @@ find_path (struct grub_btrfs_data *data,
|
|
key->object_id = data->sblock.root_dir_objectid;
|
|
key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
|
|
key->offset = 0;
|
|
- skip_default = 1;
|
|
+ follow_default = 1;
|
|
origpath = grub_strdup (path);
|
|
if (!origpath)
|
|
return grub_errno;
|
|
|
|
while (1)
|
|
{
|
|
- if (!skip_default)
|
|
+ if (!follow_default)
|
|
{
|
|
while (path[0] == '/')
|
|
path++;
|
|
@@ -1254,9 +1254,9 @@ find_path (struct grub_btrfs_data *data,
|
|
|
|
if (ctokenlen == 1 && ctoken[0] == '.')
|
|
{
|
|
- if (!skip_default)
|
|
+ if (!follow_default)
|
|
path = slash;
|
|
- skip_default = 0;
|
|
+ follow_default = 0;
|
|
continue;
|
|
}
|
|
if (ctokenlen == 2 && ctoken[0] == '.' && ctoken[1] == '.')
|
|
@@ -1287,9 +1287,9 @@ find_path (struct grub_btrfs_data *data,
|
|
*type = GRUB_BTRFS_DIR_ITEM_TYPE_DIRECTORY;
|
|
key->object_id = key_out.offset;
|
|
|
|
- if (!skip_default)
|
|
+ if (!follow_default)
|
|
path = slash;
|
|
- skip_default = 0;
|
|
+ follow_default = 0;
|
|
|
|
continue;
|
|
}
|
|
@@ -1359,9 +1359,9 @@ find_path (struct grub_btrfs_data *data,
|
|
return err;
|
|
}
|
|
|
|
- if (!skip_default)
|
|
+ if (!follow_default)
|
|
path = slash;
|
|
- skip_default = 0;
|
|
+ follow_default = 0;
|
|
if (cdirel->type == GRUB_BTRFS_DIR_ITEM_TYPE_SYMLINK)
|
|
{
|
|
struct grub_btrfs_inode inode;
|
|
@@ -1416,7 +1416,7 @@ find_path (struct grub_btrfs_data *data,
|
|
key->object_id = data->sblock.root_dir_objectid;
|
|
key->type = GRUB_BTRFS_ITEM_TYPE_DIR_ITEM;
|
|
key->offset = 0;
|
|
- skip_default = 1;
|
|
+ follow_default = 1;
|
|
}
|
|
continue;
|
|
}
|