diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/scsi/sg.h | 59 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sys/mman.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 2 |
4 files changed, 64 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 0545f4426a..4bfc3eb352 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -15,7 +15,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \ sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \ sys/user.h sys/sysmacros.h sys/procfs.h \ sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \ - sys/quota.h sys/fsuid.h bits/mman.h + sys/quota.h sys/fsuid.h bits/mman.h \ + scsi/sg.h install-others += $(inst_includedir)/bits/syscall.h diff --git a/sysdeps/unix/sysv/linux/scsi/sg.h b/sysdeps/unix/sysv/linux/scsi/sg.h new file mode 100644 index 0000000000..c0a0c3a6d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/scsi/sg.h @@ -0,0 +1,59 @@ +/* Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* + History: + Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user + process control of SCSI devices. + Development Sponsored by Killy Corp. NY NY +*/ + +#ifndef _SCSI_SG_H +#define _SCSI_SG_H 1 + +/* An SG device is accessed by writing "packets" to it, the replies + are then read using the read call. The same header is used for + replies; ignore the reply_len field. */ + +struct sg_header + { + int pack_len; /* length of incoming packet + (including header). */ + int reply_len; /* max length of expected reply. */ + int pack_id; /* id number of packet. */ + int result; /* 0==ok, otherwise error number. */ + unsigned int twelve_byte:1; /* force 12 byte command length for + group 6 & 7 commands. */ + unsigned int other_flags:31; /* for future use. */ + unsigned char sense_buffer[16]; /* used only by reads. */ + /* command follows then data for command. */ + }; + +/* ioctl's */ +#define SG_SET_TIMEOUT 0x2201 /* set timeout *(int *)arg==timeout */ +#define SG_GET_TIMEOUT 0x2202 /* get timeout return timeout */ + +#define SG_DEFAULT_TIMEOUT (60*HZ) /* 1 minute timeout */ +#define SG_DEFAULT_RETRIES 1 + +#define SG_MAX_QUEUE 4 /* maximum outstanding request, arbitrary, may be + changed if sufficient DMA buffer room available. */ + +#define SG_BIG_BUFF 32768 + +#endif /* scsi/sg.h */ diff --git a/sysdeps/unix/sysv/linux/sys/mman.h b/sysdeps/unix/sysv/linux/sys/mman.h index 0f56a70c32..c8f512c00c 100644 --- a/sysdeps/unix/sysv/linux/sys/mman.h +++ b/sysdeps/unix/sysv/linux/sys/mman.h @@ -23,6 +23,8 @@ #include <features.h> #include <bits/types.h> +#define __need_size_t +#include <stddef.h> /* Get the bit values from the kernel header file. */ #include <bits/mman.h> diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index d5c486d7d0..6028a04aaf 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -32,7 +32,7 @@ nfsservctl EXTRA nfsservctl 3 nfsservctl pause - pause 0 __libc_pause pause personality init-first personality 1 __personality personality pipe - pipe 1 __pipe pipe -prctl EXTRA prctl 5 +prctl EXTRA prctl 5 prctl query_module EXTRA query_module 5 query_module quotactl EXTRA quotactl 4 quotactl s_getdents EXTRA getdents 3 __getdents |