Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148846305
D54743.1788986329.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D54743.1788986329.diff
View Options
diff --git a/lib/libc/gen/exterr_cat_filenames.h b/lib/libc/gen/exterr_cat_filenames.h
--- a/lib/libc/gen/exterr_cat_filenames.h
+++ b/lib/libc/gen/exterr_cat_filenames.h
@@ -2,6 +2,7 @@
* Automatically @generated, use
* tools/build/make_libc_exterr_cat_filenames.sh
*/
+ [EXTERR_CAT_VMM] = "dev/vmm/vmm_dev.c",
[EXTERR_CAT_FUSE_DEVICE] = "fs/fuse/fuse_device.c",
[EXTERR_CAT_FUSE_VFS] = "fs/fuse/fuse_vfsops.c",
[EXTERR_CAT_FUSE_VNOPS] = "fs/fuse/fuse_vnops.c",
diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c
--- a/sys/dev/vmm/vmm_dev.c
+++ b/sys/dev/vmm/vmm_dev.c
@@ -8,6 +8,8 @@
#include <sys/param.h>
#include <sys/conf.h>
+#define EXTERR_CATEGORY EXTERR_CAT_VMM
+#include <sys/exterrvar.h>
#include <sys/fcntl.h>
#include <sys/ioccom.h>
#include <sys/jail.h>
@@ -1008,7 +1010,8 @@
if ((flags & VMMCTL_CREATE_DESTROY_ON_CLOSE) == 0 &&
(error = priv_check_cred(cred, PRIV_VMM_CREATE)) != 0) {
sx_xunlock(&vmmdev_mtx);
- return (error);
+ return (EXTERROR(error,
+ "An unprivileged user must run VMs in monitor mode"));
}
error = vm_create(name, &vm);
diff --git a/sys/sys/exterr_cat.h b/sys/sys/exterr_cat.h
--- a/sys/sys/exterr_cat.h
+++ b/sys/sys/exterr_cat.h
@@ -37,6 +37,7 @@
#define EXTERR_CAT_GEOM 12
#define EXTERR_CAT_FUSE_VFS 13
#define EXTERR_CAT_FUSE_DEVICE 14
+#define EXTERR_CAT_VMM 15
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 8:38 PM (8 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29528823
Default Alt Text
D54743.1788986329.diff (1 KB)
Attached To
Mode
D54743: vmm: Start using exterror
Attached
Detach File
Event Timeline
Log In to Comment