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
This commit is contained in:
Brooks Davis 2016-09-08 00:38:50 +00:00
parent 00f3ae2678
commit ef13681631
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305574
2 changed files with 0 additions and 31 deletions

View File

@ -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);
@ -138,25 +137,6 @@ freebsd32_ioctl_md(struct thread *td, struct freebsd32_ioctl_args *uap,
}
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, struct freebsd32_ioctl_args *uap)
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;

View File

@ -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)