9 int fcntl(int fd
, int cmd
, ...)
16 /* Set up for the sensible case where there is no variable parameter. This
17 * covers F_GETFD, F_GETFL and invalid commands.
19 memset(&m
, 0, sizeof(m
));
21 /* Adjust for the stupid cases. */
28 m
.m_lc_vfs_fcntl
.arg_int
= va_arg(argp
, int);
34 m
.m_lc_vfs_fcntl
.arg_ptr
= (vir_bytes
)va_arg(argp
, struct flock
*);
38 /* Clean up and make the system call. */
40 m
.m_lc_vfs_fcntl
.fd
= fd
;
41 m
.m_lc_vfs_fcntl
.cmd
= cmd
;
42 return(_syscall(VFS_PROC_NR
, VFS_FCNTL
, &m
));