Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162634256
D54743.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
D54743.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>
@@ -1010,7 +1012,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"));
}
if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) {
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
@@ -39,6 +39,7 @@
#define EXTERR_CAT_FUSE_DEVICE 14
#define EXTERR_CAT_FORK 15
#define EXTERR_CAT_PROCEXIT 16
+#define EXTERR_CAT_VMM 17
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 7:02 AM (11 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35128120
Default Alt Text
D54743.diff (1 KB)
Attached To
Mode
D54743: vmm: Start using exterror
Attached
Detach File
Event Timeline
Log In to Comment