git: 08cb63a12fd9 - main - bhyve/block_if: allow DIOCGMEDIASIZE ioctl
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Jan 2022 16:48:46 UTC
The branch main has been updated by rew:
URL: https://cgit.FreeBSD.org/src/commit/?id=08cb63a12fd9c0e575ee489353b53d53b4a45411
commit 08cb63a12fd9c0e575ee489353b53d53b4a45411
Author: Robert Wing <rew@FreeBSD.org>
AuthorDate: 2022-01-25 16:44:13 +0000
Commit: Robert Wing <rew@FreeBSD.org>
CommitDate: 2022-01-25 16:44:13 +0000
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
---
usr.sbin/bhyve/block_if.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);