FreeBSD Bugzilla – Attachment 222379 Details for
Bug 253445
bectl: does not function in two-level zfs datasets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
diff to allow the pool dataset to be the BE root when specified
libbe_allow_pool_root.diff (text/plain), 1.09 KB, created by
Wes Maag
on 2021-02-11 23:31:09 UTC
(
hide
)
Description:
diff to allow the pool dataset to be the BE root when specified
Filename:
MIME Type:
Creator:
Wes Maag
Created:
2021-02-11 23:31:09 UTC
Size:
1.09 KB
patch
obsolete
>diff --git a/lib/libbe/be.c b/lib/libbe/be.c >index d6fe027f5df..af38427d645 100644 >--- a/lib/libbe/be.c >+++ b/lib/libbe/be.c >@@ -144,19 +144,21 @@ libbe_init(const char *root) > } else > strlcpy(lbh->root, root, sizeof(lbh->root)); > >- if ((pos = strchr(lbh->root, '/')) == NULL) >- goto err; >- >- pnamelen = pos - lbh->root; >- poolname = malloc(pnamelen + 1); >- if (poolname == NULL) >- goto err; >+ if ((pos = strchr(lbh->root, '/')) == NULL) { >+ if((lbh->active_phandle = zpool_open(lbh->lzh, lbh->root)) == NULL) >+ goto err; >+ } else { >+ pnamelen = pos - lbh->root; >+ poolname = malloc(pnamelen + 1); >+ if (poolname == NULL) >+ goto err; > >- strlcpy(poolname, lbh->root, pnamelen + 1); >- if ((lbh->active_phandle = zpool_open(lbh->lzh, poolname)) == NULL) >- goto err; >- free(poolname); >- poolname = NULL; >+ strlcpy(poolname, lbh->root, pnamelen + 1); >+ if ((lbh->active_phandle = zpool_open(lbh->lzh, poolname)) == NULL) >+ goto err; >+ free(poolname); >+ poolname = NULL; >+ } > > if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_BOOTFS, lbh->bootfs, > sizeof(lbh->bootfs), NULL, true) != 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253445
: 222379