svn commit: r317099 - head/sys/boot/uboot/lib
Toomas Soome
tsoome at FreeBSD.org
Tue Apr 18 19:36:59 UTC 2017
Author: tsoome
Date: Tue Apr 18 19:36:58 2017
New Revision: 317099
URL: https://svnweb.freebsd.org/changeset/base/317099
Log:
loader: uboot disk ioctl should call disk_ioctl
As the uboot disk interface is using common/disk.c API, we also
should use disk_ioctl() call, this will give us chance to read partition
sizes and have feature parity with UEFI and BIOS implementations.
This does also fix arm boot issue on some systems, reported/tested by Ian,
thanks.
Reported by: ian
Reviewed by: ian
Differential Revision: https://reviews.freebsd.org/D10421
Modified:
head/sys/boot/uboot/lib/disk.c
Modified: head/sys/boot/uboot/lib/disk.c
==============================================================================
--- head/sys/boot/uboot/lib/disk.c Tue Apr 18 19:15:06 2017 (r317098)
+++ head/sys/boot/uboot/lib/disk.c Tue Apr 18 19:36:58 2017 (r317099)
@@ -275,8 +275,13 @@ static int
stor_ioctl(struct open_file *f, u_long cmd, void *data)
{
struct disk_devdesc *dev;
+ int rc;
dev = (struct disk_devdesc *)f->f_devdata;
+ rc = disk_ioctl(dev, cmd, data);
+ if (rc != ENOTTY)
+ return (rc);
+
switch (cmd) {
case DIOCGSECTORSIZE:
*(u_int *)data = SI(dev).bsize;
More information about the svn-src-all
mailing list