Date: Tue, 18 Apr 2017 19:36:58 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317099 - head/sys/boot/uboot/lib Message-ID: <201704181936.v3IJawY6060671@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704181936.v3IJawY6060671>