I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
--- sys/compat/linux/linux_ioctl.c 31 Oct 2003 18:31:55 -0000 1.112
|
|
+++ sys/compat/linux/linux_ioctl.c 23 Jun 2004 01:34:41 -0000
|
|
@@ -1328,20 +1328,22 @@
|
|
}
|
|
|
|
case LINUX_CDROMREADTOCENTRY: {
|
|
- struct linux_cdrom_tocentry lte, *ltep =
|
|
- (struct linux_cdrom_tocentry *)args->arg;
|
|
+ struct linux_cdrom_tocentry lte;
|
|
struct ioc_read_toc_single_entry irtse;
|
|
- irtse.address_format = ltep->cdte_format;
|
|
- irtse.track = ltep->cdte_track;
|
|
+
|
|
+ error = copyin((void *)args->arg, <e, sizeof(lte));
|
|
+ if (error)
|
|
+ break;
|
|
+ irtse.address_format = lte.cdte_format;
|
|
+ irtse.track = lte.cdte_track;
|
|
error = fo_ioctl(fp, CDIOREADTOCENTRY, (caddr_t)&irtse,
|
|
td->td_ucred, td);
|
|
if (!error) {
|
|
- lte = *ltep;
|
|
lte.cdte_ctrl = irtse.entry.control;
|
|
lte.cdte_adr = irtse.entry.addr_type;
|
|
bsd_to_linux_msf_lba(irtse.address_format,
|
|
&irtse.entry.addr, <e.cdte_addr);
|
|
- copyout(<e, (void *)args->arg, sizeof(lte));
|
|
+ error = copyout(<e, (void *)args->arg, sizeof(lte));
|
|
}
|
|
break;
|
|
}
|
|
@@ -1826,11 +1828,14 @@
|
|
break;
|
|
|
|
case LINUX_VT_SETMODE: {
|
|
- struct vt_mode *mode;
|
|
+ struct vt_mode mode;
|
|
+ if ((error = copyin((void *)args->arg, &mode, sizeof(mode))))
|
|
+ break;
|
|
+ if (!ISSIGVALID(mode.frsig) && ISSIGVALID(mode.acqsig))
|
|
+ mode.frsig = mode.acqsig;
|
|
+ if ((error = copyout(&mode, (void *)args->arg, sizeof(mode))))
|
|
+ break;
|
|
args->cmd = VT_SETMODE;
|
|
- mode = (struct vt_mode *)args->arg;
|
|
- if (!ISSIGVALID(mode->frsig) && ISSIGVALID(mode->acqsig))
|
|
- mode->frsig = mode->acqsig;
|
|
error = (ioctl(td, (struct ioctl_args *)args));
|
|
break;
|
|
}
|