Date: Fri, 1 Apr 2011 13:20:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r220243 - stable/8/sys/compat/freebsd32 Message-ID: <201104011320.p31DKdEJ046511@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Apr 1 13:20:39 2011 New Revision: 220243 URL: http://svn.freebsd.org/changeset/base/220243 Log: MFC r219988: Fully emulate MDIOCLIST for compat32. Modified: stable/8/sys/compat/freebsd32/freebsd32_ioctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_ioctl.c Fri Apr 1 12:52:55 2011 (r220242) +++ stable/8/sys/compat/freebsd32/freebsd32_ioctl.c Fri Apr 1 13:20:39 2011 (r220243) @@ -64,7 +64,7 @@ freebsd32_ioctl_md(struct thread *td, st struct md_ioctl mdv; struct md_ioctl32 md32; u_long com = 0; - int error; + int i, error; if (uap->com & IOC_IN) { if ((error = copyin(uap->data, &md32, sizeof(md32)))) { @@ -116,6 +116,14 @@ freebsd32_ioctl_md(struct thread *td, st CP(mdv, md32, md_base); CP(mdv, md32, md_fwheads); CP(mdv, md32, md_fwsectors); + if (com == MDIOCLIST) { + /* + * Use MDNPAD, and not MDNPAD32. Padding is + * allocated and used by compat32 ABI. + */ + for (i = 0; i < MDNPAD; i++) + CP(mdv, md32, md_pad[i]); + } error = copyout(&md32, uap->data, sizeof(md32)); } return error;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104011320.p31DKdEJ046511>