Jordan Beaver
2014-Dec-09 10:45 UTC
[syslinux] [PATCH] check for default subvolid and act accordingly on install
This fixes the issue I had come across with the default subvolume not being set/used on btrfs when isntalling via `extlinux --install /boot/syslinux`. Signed-off-by: Jordan Beaver <jordan at beaveris.me> --- extlinux/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extlinux/main.c b/extlinux/main.c index 09740bd..c3d9612 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -1261,6 +1261,9 @@ static const char *find_device_btrfs(const char *path) if (!validate_device_btrfs(pfd, dfd)) rv = (const char *)devinfo.path; /* It's good! */ + /* check for default subvolume and act accordingly */ + get_default_subvol("/", subvol); + err: if (pfd >= 0) close(pfd); -- 2.1.3 -Beaver
Gene Cumm
2015-Apr-04 21:01 UTC
[syslinux] [PATCH] check for default subvolid and act accordingly on install
On Tue, Dec 9, 2014 at 5:45 AM, Jordan Beaver <jordan at beaveris.me> wrote:> This fixes the issue I had come across with the default subvolume not being > set/used on btrfs when isntalling via `extlinux --install /boot/syslinux`. > > Signed-off-by: Jordan Beaver <jordan at beaveris.me> > --- > extlinux/main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/extlinux/main.c b/extlinux/main.c > index 09740bd..c3d9612 100644 > --- a/extlinux/main.c > +++ b/extlinux/main.c > @@ -1261,6 +1261,9 @@ static const char *find_device_btrfs(const char *path) > if (!validate_device_btrfs(pfd, dfd)) > rv = (const char *)devinfo.path; /* It's good! */ > > + /* check for default subvolume and act accordingly */ > + get_default_subvol("/", subvol); > + > err: > if (pfd >= 0) > close(pfd); > --Jordan, the indentation on this is incorrect. Did you intend to have it inside the conditional "if (!validate_device_btrfs(pfd, dfd))" or executed afterwards? Also reference http://bugzilla.syslinux.org/show_bug.cgi?id=59 -- -Gene
Gene Cumm
2015-Apr-05 22:22 UTC
[syslinux] [PATCH] check for default subvolid and act accordingly on install
On Sat, Apr 4, 2015 at 5:01 PM, Gene Cumm <gene.cumm at gmail.com> wrote:> On Tue, Dec 9, 2014 at 5:45 AM, Jordan Beaver <jordan at beaveris.me> wrote: >> This fixes the issue I had come across with the default subvolume not being >> set/used on btrfs when isntalling via `extlinux --install /boot/syslinux`. >> >> Signed-off-by: Jordan Beaver <jordan at beaveris.me> >> --- >> extlinux/main.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/extlinux/main.c b/extlinux/main.c >> index 09740bd..c3d9612 100644 >> --- a/extlinux/main.c >> +++ b/extlinux/main.c >> @@ -1261,6 +1261,9 @@ static const char *find_device_btrfs(const char *path) >> if (!validate_device_btrfs(pfd, dfd)) >> rv = (const char *)devinfo.path; /* It's good! */ >> >> + /* check for default subvolume and act accordingly */ >> + get_default_subvol("/", subvol); >> + >> err: >> if (pfd >= 0) >> close(pfd); >> -- > > Jordan, the indentation on this is incorrect. Did you intend to have > it inside the conditional "if (!validate_device_btrfs(pfd, dfd))" or > executed afterwards? > > Also reference http://bugzilla.syslinux.org/show_bug.cgi?id=59 > > -- > -GeneJordan, skipping your direct destination in case it's some issue of your MX and Google. -- -Gene