summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ioctl.c
Commit message (Collapse)AuthorAgeFilesLines
* - Protect the list of linux ioctl handlers with an sx lock.jhb2006-07-061-0/+17
| | | | | | - Hold Giant while calling linux ioctl handlers for now as they aren't all known to be MPSAFE yet. - Mark linux_ioctl() MPSAFE.
* Now that we don't have a linuxolator on alpha anymore:netchild2006-05-101-35/+0
| | | | | - unifdef __alpha__ - revert rev. 1.66 of linux_socket.c
* Unbreak COMPAT_LINUX32 option support on amd64.ru2006-03-191-0/+2
| | | | Broken by: netchild
* Fixup some problems in my previous commit (COMPAT_43).netchild2006-03-181-2/+0
| | | | Pointyhat to: netchild
* Get rid of the need of COMPAT_43 in the linuxolator.netchild2006-03-181-4/+31
| | | | | Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Obtained from: DragonFly (some parts)
* Linux compat bits needed to make linux programs use the new ptys :cognet2006-01-261-1/+9
| | | | | | | | | | linux_ioctl.[ch] : Implement LINUX_TIOCGPTN, which returns the pty number linux_stats.c : - Return the magic number for devfs. - In various stats()-related functions, check that we're stating a file in /dev/pts, and if so, change the st_rdev field to match what linux expects to be there for a slave pty device. The glibc checks for this, and their openpty() fails if it is no correct.
* In Linux, kernel parameters passed to ioctl are by value, while in FreeBSDdelphij2005-12-131-5/+5
| | | | | | | they are passed by reference. Handle the difference within the linux_ioctl_termio on the LINUX_TCFLSH path. Submitted by: Jaroslav Drzik <jaro_AT_coop-voz_dot_sk>
* Fix kernel build.delphij2005-08-281-1/+1
| | | | Reported by: tinderbox
* Rewrite linux_ifconf() to be more like ifconf() in net/if.crodrigc2005-08-271-25/+39
| | | | | | | | | | | so that we do not call uiomove() while IFNET_RLOCK() is held. This eliminates the witness warning: Calling uiomove() with the following non-sleepable locks held: exclusive sleep mutex ifnet r = 0 (0xc096dd60) locked @ /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:2170 MFC after: 2 days
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-2/+2
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Implement SOUND_MIXER_INFO ioctl in compat layer.mdodd2005-04-131-3/+36
|
* Use the CTASSERT() macro instead of rolling my own, non-portable onebrooks2005-03-241-3/+1
| | | | | | using #error. Suggested by: jhb
* Compile errors are way more useful then panics later.brooks2005-03-241-3/+4
| | | | | | Replace a KASSERT of LINUX_IFNAMSIZ == IFNAMSIZ with a preprocessor check and #error message. This will prevent nasty suprises if users change IFNAMSIZ without updating the linux code appropriatly.
* Boot away another stackgap (one of the lest ones in linuxlator/i386) bysobomax2005-01-301-14/+13
| | | | | | | | | | providing special version of CDIOCREADSUBCHANNEL ioctl(), which assumes that result has to be placed into kernel space not user space. In the long run more generic solution has to be designed WRT emulating various ioctl()s that operate on userspace buffers, but right now there is only one such ioctl() is emulated, so that it makes little sense. MFC after: 2 weeks
* Match the LINUX32's style with existing styleobrien2005-01-141-5/+5
| | | | | | Submitted by: Jung-uk Kim <jkim@niksun.com> Use positive, not negative logic.
* Start each of the license/copyright comments with /*-imp2005-01-051-1/+1
|
* Changes to MI Linux emulation code necessary to run 32-bit Linux binariestjr2004-08-161-2/+13
| | | | | | | | | | | | | | | on AMD64, and the general case where the emulated platform has different size pointers than we use natively: - declare certain structure members as l_uintptr_t and use the new PTRIN and PTROUT macros to convert to and from native pointers. - declare some structures __packed on amd64 when the layout would differ from that used on i386. - include <machine/../linux32/linux.h> instead of <machine/../linux/linux.h> if compiling with COMPAT_LINUX32. This will need to be revisited before 32-bit and 64-bit Linux emulation support can coexist in the same kernel. - other small scattered changes. This should be a no-op on i386 and Alpha.
* Implement SNDCTL_DSP_SETDUPLEX. This may fix sound apps which want tonetchild2004-07-021-0/+4
| | | | | | use full duplex mode. Approved by: matk
* Add stub for Linux SOUND_MIXER_READ_RECMASK, required by some Linux soundbms2004-06-181-0/+4
| | | | | | | applications. PR: misc/27471 Submitted by: Gavin Atkinson (with cleanups)
* Add a stub for the Linux SOUND_MIXER_INFO ioctl (even though we don'tbms2004-06-181-0/+4
| | | | | | | | actually implement it), as some applications, such as RealProducer, expect to be able to use it. PR: kern/65971 Submitted by: Matt Wright
* Linux applications expect to be able to call SIOCGIFCONF with anbms2004-06-181-0/+14
| | | | | | | | | | NULL ifc.ifc_buf pointer, to determine the expected buffer size. The submitted fix only takes account of interfaces with an AF_INET address configured. This could no doubt be improved. PR: kern/45753 Submitted by: Jacques Garrigue (with cleanups)
* Fix the VT_SETMODE/CDROMIOCTOCENTRY problem correctly.bms2004-06-181-15/+17
| | | | Reviewed by: tjr
* Fix two attempts to use an unchecked NULL pointer provided from thebms2004-06-181-7/+10
| | | | | | userland, for the CDIOREADTOCENTRY and VT_SETMODE cases respectively. Noticed by: tjr
* Add support for more linux ioctls.phk2004-06-141-0/+105
| | | | | | | | I've had this sitting in my tree for a long time and I can't seem to find who sent it to me in the first place, apologies to whoever is missing out on a Contributed by: line here. I belive it works as it should.
* Add BSD compatibility tty ioctls LINUX_TIOCSBRK and LINUX_TIOCCBRK. Thisbms2004-02-191-0/+10
| | | | | | | addition appears to allow VMware 3 Workstation to operate with nmdm(4) as a virtual COM device. Tested by: Guido van Rooij
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-7/+4
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* fix build: linux_to_bsd_msf_lba is no longer used because of previous commitsam2003-10-201-12/+0
|
* We dont support CDROMREADAUDIO anymore.sos2003-10-201-18/+1
|
* Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa formarcel2003-06-281-2/+4
| | | | | | | | | | | | | | | | the VMIN and VTIME members of the c_cc array. These members are not special control characters. By not excluding these members we changed the noncanonical mode input processing when both members were 0 on entry (=LINUX_POSIX_VDISABLE) as we would remap them to 255 (=_POSIX_VDISABLE). See termios(4) case A for how that screws up your terminal I/O. PR: 23173 Originator: Bjarne Blichfeldt <bbl@dk.damgaard.com> Patch by: Boris Nikolaus <bn@dali.tellique.de> (original submission) Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de> Reminders by: Joseph Holland King <gte743n@cad.gatech.edu> MFC after: 5 days
* Use __FBSDID().obrien2003-06-101-2/+3
|
* Add an ioctl handler for the DRM. This removes the need for the DRM_LINUXanholt2003-04-241-0/+14
| | | | option, which has been a source of frustration for many users.
* Don't include <sys/disklabel.h>phk2003-04-161-1/+0
|
* Add #include <sys/conf.h> so we don't rely on <sys/disk.h> doing it.phk2003-04-011-0/+1
|
* Fix an XXX: and implement LINUX_BLKGETSIZE correctly.phk2003-03-281-6/+14
|
* - Change the linux_[gs]et_os{name, release, s_version}() functions tojhb2003-03-131-1/+1
| | | | | | | | | | | | | take a thread instead of a proc for their first argument. - Add a mutex to protect the system-wide Linux osname, osrelease, and oss_version variables. - Change linux_get_prison() to take a thread instead of a proc for its first argument and to use td_ucred rather than p_ucred. This is ok because a thread's prison does not change even though it's ucred might. - Also, change linux_get_prison() to return a struct prison * instead of a struct linux_prison * since it returns with the struct prison locked and this makes it easier to safely unlock the prison when we are done messing with it.
* More caddr_t removal, in conjunction with copy{in,out}(9) this time.des2003-03-031-44/+37
| | | | Also clean up some egregious casts and incorrect use of sizeof.
* Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.des2003-03-021-22/+22
|
* uiomove-related caddr_t -> void * (just the low-hanging fruit)des2003-03-021-2/+1
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Add function linux_msg() for regulating output from the linux emulationalfred2003-01-021-1/+1
| | | | | | | | | | | code, make the emulator use it. Rename unsupported_msg() to unimplemented_syscall(). Rename some arguments for clarity Fixup grammar. Requested by: bde
* SMP locking for ifnet list.hsu2002-12-221-2/+12
|
* Implement the CDROMREADAUDIO ioctl.marcel2002-10-191-1/+37
|
* - Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2);sobomax2002-10-111-0/+15
| | | | | | | | | | | | | - add wrappers for mmap2(2) and ftruncate64(2) system calls; - don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked; - add support for SOUND_MIXER_READ_STEREODEVS ioctl(2); - make msgctl(IPC_STAT) and IPC_SET actually working by converting from BSD msqid_ds to Linux and vice versa; - properly return EINVAL if semget(2) is called with nsems being negative. Reviewed by: marcel Approved by: marcel Tested with: LSB runtime test
* Remove NVIDIA ioctl bits. They will be provided in a kernel module.mdodd2002-09-201-22/+0
|
* Put an XXX comment here to point somebody in the right direction.phk2002-09-201-0/+1
|
* Current uses struct thread *td rather than struct proc *p.imp2002-09-201-2/+2
|
* This patch extends the FreeBSD Linux compatibility layer to supportmdodd2002-09-191-0/+22
| | | | | | | NVIDIA API calls; more specifically, it adds an ioctl() handler for the range of possible NVIDIA ioctl numbers. Submitted by: Christian Zander <zander@minion.de>
* Implement LINUX_TIOCSCTTY.marcel2002-09-051-1/+4
| | | | PR: kern/42404
* Increase size of ifnet.if_flags from 16 bits (short) to 32 bits (int). To avoidsobomax2002-08-181-1/+1
| | | | | | | breaking application ABI use unused ifreq.ifru_flags[1] for upper 16 bits in SIOCSIFFLAGS and SIOCGIFFLAGS ioctl's. Reviewed by: -hackers, -net
OpenPOWER on IntegriCloud