aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Wing <rew@FreeBSD.org>2022-01-25 16:44:13 +0000
committerRobert Wing <rew@FreeBSD.org>2022-01-25 16:44:13 +0000
commit08cb63a12fd9c0e575ee489353b53d53b4a45411 (patch)
treecfbd9579017c3dd858ed08ec97ed058409a43600
parentb7a74bbc41b38fc7f43d66ba868e22a97f08f660 (diff)
downloadsrc-08cb63a12fd9c0e575ee489353b53d53b4a45411.tar.gz
src-08cb63a12fd9c0e575ee489353b53d53b4a45411.zip
bhyve/block_if: allow DIOCGMEDIASIZE ioctl
This is needed to get mediasize of the device after a resize event. I missed this earlier as I was building WITH_BHYVE_SNAPSHOT, which disables capsicum. Reviewed by: khng, markj Fixes: ae9ea22e14bf ("bhyve: get mediasize for character devices when ...") Differential Revision: https://reviews.freebsd.org/D34013
-rw-r--r--usr.sbin/bhyve/block_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c
index 217f7181de75..06c3cb50fb13 100644
--- a/usr.sbin/bhyve/block_if.c
+++ b/usr.sbin/bhyve/block_if.c
@@ -481,7 +481,7 @@ blockif_open(nvlist_t *nvl, const char *ident)
#ifndef WITHOUT_CAPSICUM
cap_rights_t rights;
- cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE };
+ cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE, DIOCGMEDIASIZE };
#endif
pthread_once(&blockif_once, blockif_init);