svn commit: r305896 - head/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sat Sep 17 08:10:03 UTC 2016


Author: dchagin
Date: Sat Sep 17 08:10:01 2016
New Revision: 305896
URL: https://svnweb.freebsd.org/changeset/base/305896

Log:
  Implement BLKSSZGET ioctl for the Linuxulator.
  
  PR:		212700
  Submitted by:	Erik Cederstrand
  Reported by:	Erik Cederstrand
  MFC after:	1 week

Modified:
  head/sys/compat/linux/linux_ioctl.c

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Sat Sep 17 05:44:57 2016	(r305895)
+++ head/sys/compat/linux/linux_ioctl.c	Sat Sep 17 08:10:01 2016	(r305896)
@@ -297,6 +297,15 @@ linux_ioctl_disk(struct thread *td, stru
 		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);


More information about the svn-src-all mailing list