The argument to the DIOCGMEDIASIZE ioctl() is an off_t, not an u_int.
Reviewed by: phk
This commit is contained in:
parent
42de95691d
commit
2408cfebf9
@ -250,7 +250,7 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
|
||||
break;
|
||||
case DIOCGMEDIASIZE:
|
||||
error = g_io_getattr("GEOM::mediasize", cp, &i, data);
|
||||
if (error == 0 && *(u_int *)data == 0)
|
||||
if (error == 0 && *(off_t *)data == 0)
|
||||
error = ENOENT;
|
||||
break;
|
||||
case DIOCGFWSECTORS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user