aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/uboot
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2017-04-18 19:36:58 +0000
committerToomas Soome <tsoome@FreeBSD.org>2017-04-18 19:36:58 +0000
commit64ad3fe3f9c5d631045b3ba7196e0d1ecc76ed46 (patch)
tree190b95f0e60c7915aedaeefee71939f9599dfd6d /sys/boot/uboot
parentc9296b32275a8b6766447dd78e73653102fb4fa7 (diff)
downloadsrc-64ad3fe3f9c5d631045b3ba7196e0d1ecc76ed46.tar.gz
src-64ad3fe3f9c5d631045b3ba7196e0d1ecc76ed46.zip
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
Notes
Notes: svn path=/head/; revision=317099
Diffstat (limited to 'sys/boot/uboot')
-rw-r--r--sys/boot/uboot/lib/disk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/boot/uboot/lib/disk.c b/sys/boot/uboot/lib/disk.c
index 994f03991c09..f5e44c749ba3 100644
--- a/sys/boot/uboot/lib/disk.c
+++ b/sys/boot/uboot/lib/disk.c
@@ -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;