svn commit: r305574 - head/sys/compat/freebsd32

Brooks Davis brooks at FreeBSD.org
Thu Sep 8 00:38:52 UTC 2016


Author: brooks
Date: Thu Sep  8 00:38:50 2016
New Revision: 305574
URL: https://svnweb.freebsd.org/changeset/base/305574

Log:
  Remove a pointless translation of struct ioc_toc_header.
  
  struct ioc_toc_header will be the same size (and thus IOREADTOCHEADER
  will have the same value on all supported platforms).
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/compat/freebsd32/freebsd32_ioctl.c
  head/sys/compat/freebsd32/freebsd32_ioctl.h

Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_ioctl.c	Wed Sep  7 23:37:10 2016	(r305573)
+++ head/sys/compat/freebsd32/freebsd32_ioctl.c	Thu Sep  8 00:38:50 2016	(r305574)
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
 /* Cannot get exact size in 64-bit due to alignment issue of entire struct. */
 CTASSERT((sizeof(struct md_ioctl32)+4) == 436);
 CTASSERT(sizeof(struct ioc_read_toc_entry32) == 8);
-CTASSERT(sizeof(struct ioc_toc_header32) == 4);
 CTASSERT(sizeof(struct mem_range_op32) == 12);
 CTASSERT(sizeof(struct pci_conf_io32) == 36);
 CTASSERT(sizeof(struct pci_match_conf32) == 44);
@@ -139,25 +138,6 @@ freebsd32_ioctl_md(struct thread *td, st
 
 
 static int
-freebsd32_ioctl_ioc_toc_header(struct thread *td,
-    struct freebsd32_ioctl_args *uap, struct file *fp)
-{
-	struct ioc_toc_header toch;
-	struct ioc_toc_header32 toch32;
-	int error;
-
-	if ((error = copyin(uap->data, &toch32, sizeof(toch32))))
-		return (error);
-	CP(toch32, toch, len);
-	CP(toch32, toch, starting_track);
-	CP(toch32, toch, ending_track);
-	error = fo_ioctl(fp, CDIOREADTOCHEADER, (caddr_t)&toch,
-	    td->td_ucred, td);
-	return (error);
-}
-
-
-static int
 freebsd32_ioctl_ioc_read_toc(struct thread *td,
     struct freebsd32_ioctl_args *uap, struct file *fp)
 {
@@ -441,10 +421,6 @@ freebsd32_ioctl(struct thread *td, struc
 		error = freebsd32_ioctl_ioc_read_toc(td, uap, fp);
 		break;
 
-	case CDIOREADTOCHEADER_32:
-		error = freebsd32_ioctl_ioc_toc_header(td, uap, fp);
-		break;
-
 	case FIODGNAME_32:
 		error = freebsd32_ioctl_fiodgname(td, uap, fp);
 		break;

Modified: head/sys/compat/freebsd32/freebsd32_ioctl.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_ioctl.h	Wed Sep  7 23:37:10 2016	(r305573)
+++ head/sys/compat/freebsd32/freebsd32_ioctl.h	Thu Sep  8 00:38:50 2016	(r305574)
@@ -36,12 +36,6 @@
 
 typedef __uint32_t caddr_t32;
 
-struct ioc_toc_header32 {
-	u_short	len;
-	u_char	starting_track;
-	u_char	ending_track;
-};
-
 struct ioc_read_toc_entry32 {
 	u_char	address_format;
 	u_char	starting_track;
@@ -115,7 +109,6 @@ struct pci_conf_io32 {
 };
 
 #define	CDIOREADTOCENTRYS_32 _IOWR('c', 5, struct ioc_read_toc_entry32)
-#define	CDIOREADTOCHEADER_32 _IOR('c', 4, struct ioc_toc_header32)
 #define	MDIOCATTACH_32	_IOC(IOC_INOUT, 'm', 0, sizeof(struct md_ioctl32) + 4)
 #define	MDIOCDETACH_32	_IOC(IOC_INOUT, 'm', 1, sizeof(struct md_ioctl32) + 4)
 #define	MDIOCQUERY_32	_IOC(IOC_INOUT, 'm', 2, sizeof(struct md_ioctl32) + 4)


More information about the svn-src-head mailing list