FreeBSD Bugzilla – Attachment 183676 Details for
Bug 220186
bhyveload zfs boot broken after zfs boot change
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
file_220186.txt (text/plain), 679 bytes, created by
Andriy Gapon
on 2017-06-21 15:40:39 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Andriy Gapon
Created:
2017-06-21 15:40:39 UTC
Size:
679 bytes
patch
obsolete
>diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c >index c67a2f6989363..55de2eceb0b28 100644 >--- a/usr.sbin/bhyveload/bhyveload.c >+++ b/usr.sbin/bhyveload/bhyveload.c >@@ -311,10 +311,12 @@ cb_diskioctl(void *arg, int unit, u_long cmd, void *data) > *(u_int *)data = 512; > break; > case DIOCGMEDIASIZE: >- if (fstat(disk_fd[unit], &sb) == 0) >- *(off_t *)data = sb.st_size; >- else >+ if (fstat(disk_fd[unit], &sb) != 0) > return (ENOTTY); >+ if (S_ISCHR(sb.st_mode) && >+ ioctl(disk_fd[unit], DIOCGMEDIASIZE, &sb.st_size) != 0) >+ return (ENOTTY); >+ *(off_t *)data = sb.st_size; > break; > default: > return (ENOTTY);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220186
: 183676