The argument to the DIOCGMEDIASIZE ioctl() is an off_t, not an u_int.

Reviewed by:	phk
This commit is contained in:
Thomas Moestl 2002-10-19 15:40:39 +00:00
parent 42de95691d
commit 2408cfebf9

View File

@ -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: