diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 5250e212093..2b1bfec9a62 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -722,6 +722,8 @@ disk_open(char *path) return (ERANGE); fd = open(path, O_RDWR); + if (fd < 0) + fd = open(path, O_RDONLY); if (fd < 0) return (errno);