Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102941651
D34605.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34605.diff
View Options
diff --git a/lib/libbe/be.c b/lib/libbe/be.c
--- a/lib/libbe/be.c
+++ b/lib/libbe/be.c
@@ -961,6 +961,17 @@
if (!zfs_name_valid(name, ZFS_TYPE_DATASET))
return (BE_ERR_INVALIDNAME);
+ /*
+ * ZFS allows spaces in boot environment names, but the kernel can't
+ * handle booting from such a dataset right now. vfs.root.mountfrom
+ * is defined to be a space-separated list, and there's no protocol for
+ * escaping whitespace in the path component of a dev:path spec. So
+ * while loader can handle this situation alright, it can't safely pass
+ * it on to mountroot.
+ */
+ if (strchr(name, ' ') != NULL)
+ return (BE_ERR_INVALIDNAME);
+
return (BE_ERR_SUCCESS);
}
diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c
--- a/sbin/bectl/bectl.c
+++ b/sbin/bectl/bectl.c
@@ -134,7 +134,6 @@
return (NULL);
}
-
static int
bectl_cmd_activate(int argc, char *argv[])
{
@@ -233,10 +232,7 @@
bootenv = *argv;
err = BE_ERR_SUCCESS;
- if (strchr(bootenv, ' ') != NULL)
- /* BE datasets with spaces are not bootable */
- err = BE_ERR_INVALIDNAME;
- else if ((atpos = strchr(bootenv, '@')) != NULL) {
+ if ((atpos = strchr(bootenv, '@')) != NULL) {
/*
* This is the "create a snapshot variant". No new boot
* environment is to be created here.
@@ -478,7 +474,6 @@
dest = argv[2];
err = be_rename(be, src, dest);
-
switch (err) {
case BE_ERR_SUCCESS:
break;
@@ -487,7 +482,7 @@
src, dest);
}
- return (0);
+ return (err);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 12:56 AM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14726547
Default Alt Text
D34605.diff (1 KB)
Attached To
Mode
D34605: bectl: push space-in-name check down into libbe
Attached
Detach File
Event Timeline
Log In to Comment