4.3BSD-Reno/share/man/cat2/ioctl.0

Compare this file to the similar file:
Show the results in this format:




IOCTL(2)		      1986			 IOCTL(2)



NNAAMMEE
     ioctl - control device

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssyyss//iiooccttll..hh>>

     iiooccttll((dd,, rreeqquueesstt,, aarrggpp))
     iinntt dd;;
     uunnssiiggnneedd lloonngg rreeqquueesstt;;
     cchhaarr **aarrggpp;;

DDEESSCCRRIIPPTTIIOONN
     _I_o_c_t_l performs a variety of functions on open descriptors.
     In particular, many operating characteristics of character
     special files (e.g. terminals) may be controlled with _i_o_c_t_l
     requests.	The writeups of various devices in section 4 dis-
     cuss how _i_o_c_t_l applies to them.

     An  ioctl _r_e_q_u_e_s_t has encoded in it whether the argument is
     an "in" parameter or "out" parameter, and the size of the
     argument _a_r_g_p in bytes.  Macros and defines used in specify-
     ing an ioctl _r_e_q_u_e_s_t are located in the file <_s_y_s/_i_o_c_t_l._h>.

RREETTUURRNN VVAALLUUEE
     If an error has occurred, a value of -1 is returned and
     _e_r_r_n_o is set to indicate the error.

EERRRROORRSS
     _I_o_c_t_l will fail if one or more of the following are true:

     [EBADF]	    _D is not a valid descriptor.

     [ENOTTY]	    _D is not associated with a character special
		    device.

     [ENOTTY]	    The specified request does not apply to the
		    kind of object that the descriptor _d refer-
		    ences.

     [EINVAL]	    _R_e_q_u_e_s_t or _a_r_g_p is not valid.

SSEEEE AALLSSOO
     execve(2), fcntl(2), mt(4), tty(4), intro(4N)












Printed 7/27/90               March				1