Implement BLKSSZGET ioctl for the Linuxulator.

PR:		212700
Submitted by:	Erik Cederstrand
Reported by:	Erik Cederstrand
MFC after:	1 week
This commit is contained in:
Dmitry Chagin 2016-09-17 08:10:01 +00:00
parent f383e58f2e
commit ede2869c4c

View File

@ -297,6 +297,15 @@ linux_ioctl_disk(struct thread *td, struct linux_ioctl_args *args)
return (copyout(&sectorsize, (void *)args->arg,
sizeof(sectorsize)));
break;
case LINUX_BLKSSZGET:
error = fo_ioctl(fp, DIOCGSECTORSIZE,
(caddr_t)&sectorsize, td->td_ucred, td);
fdrop(fp, td);
if (error)
return (error);
return (copyout(&sectorsize, (void *)args->arg,
sizeof(sectorsize)));
break;
}
fdrop(fp, td);
return (ENOIOCTL);