From d9fc4558e66c32834f2a4fdab31010b40f0a88de Mon Sep 17 00:00:00 2001 From: Sam Mendoza-Jonas Date: Tue, 5 Jan 2016 15:01:58 +1100 Subject: discover: Handle BTRFS root subvolumes During install some distributions[0] will create subvolumes when formatting the root filesystem with BTRFS. In particular this can mean that bootloader config files will appear (in the case of GRUB) under /var/petitboot/mnt/dev/$device/@/boot/grub/ rather than the expected /var/petitboot/mnt/dev/$device/boot/grub/ If this is the case, perform all file operations from the parser relative to this subvolume rather than the mount point. At the moment this only supports the trivial case where the subvolume name for root is blank (ie. '@'). [0] In particular, Ubuntu from at least 14.04 Signed-off-by: Sam Mendoza-Jonas --- discover/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discover/parser.c') diff --git a/discover/parser.c b/discover/parser.c index 8e767c6..fbf31b2 100644 --- a/discover/parser.c +++ b/discover/parser.c @@ -25,7 +25,7 @@ static char *local_path(struct discover_context *ctx, struct discover_device *dev, const char *filename) { - return join_paths(ctx, dev->mount_path, filename); + return join_paths(ctx, dev->root_path, filename); } int parser_request_file(struct discover_context *ctx, -- cgit v1.2.1