Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

sys_sunos.c File Reference

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/resource.h>
#include <linux/ipc.h>
#include <linux/shm.h>
#include <linux/msg.h>
#include <linux/sem.h>
#include <linux/signal.h>
#include <linux/uio.h>
#include <linux/utsname.h>
#include <linux/major.h>
#include <linux/stat.h>
#include <linux/malloc.h>
#include <linux/pagemap.h>
#include <linux/errno.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <linux/segment.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/pconf.h>
#include <asm/idprom.h>
#include <asm/unistd.h>
#include <asm/system.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/nfs.h>
#include <linux/nfs_mount.h>
#include <linux/time.h>
#include <linux/personality.h>

Include dependency graph for sys_sunos.c:

Go to the source code of this file.

Defines

#define SUNOS_NR_OPEN   256
#define VA_NORMAL   0
#define VA_ABNORMAL   1
#define VA_SEQUENTIAL   2
#define VA_INVALIDATE   3
#define MADV_NORMAL   0
#define MADV_RANDOM   1
#define MADV_SEQUENTIAL   2
#define MADV_WILLNEED   3
#define MADV_DONTNEED   4
#define _BLOCKABLE   (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
#define NAME_OFFSET(de)   ((int) ((de)->d_name - (char *) (de)))
#define ROUND_UP(x)   (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
#define SMNT_RDONLY   1
#define SMNT_NOSUID   2
#define SMNT_NEWTYPE   4
#define SMNT_GRPID   8
#define SMNT_REMOUNT   16
#define SMNT_NOSUB   32
#define SMNT_MULTI   64
#define SMNT_SYS5   128
#define _SC_ARG_MAX   1
#define _SC_CHILD_MAX   2
#define _SC_CLK_TCK   3
#define _SC_NGROUPS_MAX   4
#define _SC_OPEN_MAX   5
#define _SC_JOB_CONTROL   6
#define _SC_SAVED_IDS   7
#define _SC_VERSION   8
#define SUNOS_EWOULDBLOCK   35
#define SUNOS_SV_INTERRUPT   2

Functions

asmlinkage unsigned long sunos_mmap (unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off)
asmlinkage int sunos_mctl (unsigned long addr, unsigned long len, int function, char *arg)
asmlinkage int sunos_brk (unsigned long brk)
asmlinkage unsigned long sunos_sbrk (int increment)
asmlinkage unsigned long sunos_sstk (int increment)
asmlinkage void sunos_vadvise (unsigned long strategy)
asmlinkage void sunos_madvise (unsigned long address, unsigned long len, unsigned long strategy)
asmlinkage int sunos_mincore (unsigned long addr, unsigned long len, char *array)
asmlinkage long sunos_getdtablesize (void)
asmlinkage unsigned long sunos_sigblock (unsigned long blk_mask)
asmlinkage unsigned long sunos_sigsetmask (unsigned long newmask)
static int sunos_filldir (void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
asmlinkage int sunos_getdents (unsigned int fd, void *dirent, int cnt)
static int sunos_filldirentry (void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
asmlinkage int sunos_getdirentries (unsigned int fd, void *dirent, int cnt, unsigned int *basep)
asmlinkage int sunos_uname (struct sunos_utsname *name)
asmlinkage int sunos_nosys (void)
asmlinkage int sunos_fpathconf (int fd, int name)
asmlinkage int sunos_pathconf (char *path, int name)
asmlinkage int sys_select (int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp)
asmlinkage int sunos_select (int width, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp)
asmlinkage void sunos_nop (void)
int do_mount (kdev_t, const char *, const char *, char *, int, void *)
dev_t get_unnamed_dev (void)
void put_unnamed_dev (dev_t)
asmlinkage int sys_mount (char *, char *, char *, unsigned long, void *)
asmlinkage int sys_connect (int fd, struct sockaddr *uservaddr, int addrlen)
asmlinkage int sys_socket (int family, int type, int protocol)
asmlinkage int sys_bind (int fd, struct sockaddr *umyaddr, int addrlen)
static int sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
static int get_default (int value, int def_value)
asmlinkage int sunos_nfs_mount (char *dir_name, int linux_flags, void *data)
asmlinkage int sunos_mount (char *type, char *dir, int flags, void *data)
asmlinkage int sys_setsid (void)
asmlinkage int sys_setpgid (pid_t, pid_t)
asmlinkage int sunos_setpgrp (pid_t pid, pid_t pgid)
asmlinkage int sys_wait4 (pid_t, unsigned int *, int, struct rusage *)
asmlinkage int sunos_wait4 (pid_t pid, unsigned int *stat_addr, int options, struct rusage *ru)
int kill_pg (int, int, int)
asmlinkage int sunos_killpg (int pgrp, int sig)
asmlinkage int sunos_audit (void)
asmlinkage unsigned long sunos_gethostid (void)
asmlinkage long sunos_sysconf (int name)
asmlinkage int sys_semctl (int semid, int semnum, int cmd, union semun arg)
asmlinkage int sys_semget (key_t key, int nsems, int semflg)
asmlinkage int sys_semop (int semid, struct sembuf *tsops, unsigned nsops)
asmlinkage int sunos_semsys (int op, unsigned long arg1, unsigned long arg2, unsigned long arg3, void *ptr)
asmlinkage int sys_msgget (key_t key, int msgflg)
asmlinkage int sys_msgrcv (int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp, int msgflg)
asmlinkage int sys_msgsnd (int msqid, struct msgbuf *msgp, size_t msgsz, int msgflg)
asmlinkage int sys_msgctl (int msqid, int cmd, struct msqid_ds *buf)
asmlinkage int sunos_msgsys (int op, unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4)
asmlinkage int sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr)
asmlinkage int sys_shmctl (int shmid, int cmd, struct shmid_ds *buf)
asmlinkage int sys_shmdt (char *shmaddr)
asmlinkage int sys_shmget (key_t key, int size, int shmflg)
asmlinkage int sunos_shmsys (int op, unsigned long arg1, unsigned long arg2, unsigned long arg3)
asmlinkage int sunos_open (const char *filename, int flags, int mode)
static int check_nonblock (int ret, int fd)
asmlinkage int sys_read (unsigned int fd, char *buf, int count)
asmlinkage int sys_write (unsigned int fd, char *buf, int count)
asmlinkage int sys_recv (int fd, void *ubuf, int size, unsigned flags)
asmlinkage int sys_send (int fd, void *buff, int len, unsigned flags)
asmlinkage int sys_accept (int fd, struct sockaddr *sa, int *addrlen)
asmlinkage int sys_readv (unsigned long fd, const struct iovec *vector, long count)
asmlinkage int sys_writev (unsigned long fd, const struct iovec *vector, long count)
asmlinkage int sunos_read (unsigned int fd, char *buf, int count)
asmlinkage int sunos_readv (unsigned long fd, const struct iovec *vector, long count)
asmlinkage int sunos_write (unsigned int fd, char *buf, int count)
asmlinkage int sunos_writev (unsigned long fd, const struct iovec *vector, long count)
asmlinkage int sunos_recv (int fd, void *ubuf, int size, unsigned flags)
asmlinkage int sunos_send (int fd, void *buff, int len, unsigned flags)
asmlinkage int sys_setsockopt (int fd, int level, int optname, char *optval, int optlen)
asmlinkage int sunos_socket (int family, int type, int protocol)
asmlinkage int sunos_accept (int fd, struct sockaddr *sa, int *addrlen)
asmlinkage int sunos_sigaction (int sig, const struct old_sigaction *act, struct old_sigaction *oact)
asmlinkage int sys_getsockopt (int fd, int level, int optname, char *optval, int *optlen)
asmlinkage int sunos_setsockopt (int fd, int level, int optname, char *optval, int optlen)
asmlinkage int sunos_getsockopt (int fd, int level, int optname, char *optval, int *optlen)

Variables

static char * vstrings []
static char * mstrings []


Define Documentation

#define _BLOCKABLE   (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 

Definition at line 364 of file sys_sunos.c.

#define _SC_ARG_MAX   1
 

Definition at line 968 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_CHILD_MAX   2
 

Definition at line 969 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_CLK_TCK   3
 

Definition at line 970 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_JOB_CONTROL   6
 

Definition at line 973 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_NGROUPS_MAX   4
 

Definition at line 971 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_OPEN_MAX   5
 

Definition at line 972 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_SAVED_IDS   7
 

Definition at line 974 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define _SC_VERSION   8
 

Definition at line 975 of file sys_sunos.c.

Referenced by sunos_sysconf().

#define MADV_DONTNEED   4
 

Definition at line 282 of file sys_sunos.c.

#define MADV_NORMAL   0
 

Definition at line 278 of file sys_sunos.c.

#define MADV_RANDOM   1
 

Definition at line 279 of file sys_sunos.c.

#define MADV_SEQUENTIAL   2
 

Definition at line 280 of file sys_sunos.c.

#define MADV_WILLNEED   3
 

Definition at line 281 of file sys_sunos.c.

#define NAME_OFFSET de   )     ((int) ((de)->d_name - (char *) (de)))
 

Definition at line 408 of file sys_sunos.c.

#define ROUND_UP x   )     (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
 

Definition at line 409 of file sys_sunos.c.

#define SMNT_GRPID   8
 

Definition at line 703 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_MULTI   64
 

Definition at line 706 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_NEWTYPE   4
 

Definition at line 702 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_NOSUB   32
 

Definition at line 705 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_NOSUID   2
 

Definition at line 701 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_RDONLY   1
 

Definition at line 700 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_REMOUNT   16
 

Definition at line 704 of file sys_sunos.c.

Referenced by sunos_mount().

#define SMNT_SYS5   128
 

Definition at line 707 of file sys_sunos.c.

Referenced by sunos_mount().

#define SUNOS_EWOULDBLOCK   35
 

Definition at line 1160 of file sys_sunos.c.

Referenced by check_nonblock().

#define SUNOS_NR_OPEN   256
 

Definition at line 60 of file sys_sunos.c.

#define SUNOS_SV_INTERRUPT   2
 

Definition at line 1285 of file sys_sunos.c.

Referenced by sunos_sigaction().

#define VA_ABNORMAL   1
 

Definition at line 255 of file sys_sunos.c.

#define VA_INVALIDATE   3
 

Definition at line 257 of file sys_sunos.c.

#define VA_NORMAL   0
 

Definition at line 254 of file sys_sunos.c.

#define VA_SEQUENTIAL   2
 

Definition at line 256 of file sys_sunos.c.


Function Documentation

static int check_nonblock int  ret,
int  fd
[inline, static]
 

Definition at line 1167 of file sys_sunos.c.

References EAGAIN, fcheck(), file, O_NDELAY, and SUNOS_EWOULDBLOCK.

Referenced by sunos_accept(), sunos_read(), sunos_readv(), sunos_recv(), sunos_send(), sunos_write(), and sunos_writev().

Here is the call graph for this function:

int do_mount kdev_t  ,
const char *  ,
const char *  ,
char *  ,
int  ,
void * 
 

static int get_default int  value,
int  def_value
[static]
 

Definition at line 791 of file sys_sunos.c.

Referenced by sunos_nfs_mount().

dev_t get_unnamed_dev void   ) 
 

Definition at line 594 of file super.c.

int kill_pg int  ,
int  ,
int 
 

Referenced by disassociate_ctty(), exit_notify(), isig(), read_chan(), sunos_killpg(), tcp_check_urg(), tiocswinsz(), tty_check_change(), tty_read(), tty_write(), and vc_resize().

void put_unnamed_dev dev_t   ) 
 

asmlinkage int sunos_accept int  fd,
struct sockaddr sa,
int *  addrlen
 

Definition at line 1265 of file sys_sunos.c.

References check_nonblock(), EHOSTUNREACH, ENETUNREACH, lock_kernel, one(), out, ret, SO_BSDCOMPAT, SOL_SOCKET, sys_accept(), sys_setsockopt(), and unlock_kernel.

Here is the call graph for this function:

asmlinkage int sunos_audit void   ) 
 

Definition at line 948 of file sys_sunos.c.

References lock_kernel, printk, and unlock_kernel.

asmlinkage int sunos_brk unsigned long  brk  ) 
 

Definition at line 145 of file sys_sunos.c.

References ARCH_SUN4C_SUN4, buffermem, current, do_mmap(), do_munmap(), down(), ENOMEM, freepages, lock_kernel, MAP_FIXED, MAP_PRIVATE, nr_free_pages, nr_swap_pages, NULL, num_physpages, out, PAGE_ALIGN, page_cache_size, PAGE_SHIFT, PAGE_SIZE, PROT_EXEC, PROT_READ, PROT_WRITE, RLIM_INFINITY, RLIMIT_DATA, unlock_kernel, and up.

Referenced by solaris_brk(), and sunos_sbrk().

Here is the call graph for this function:

static int sunos_filldir void *  __buf,
const char *  name,
int  namlen,
off_t  offset,
ino_t  ino
[static]
 

Definition at line 411 of file sys_sunos.c.

References buf, copy_to_user, sunos_dirent_callback::count, sunos_dirent_callback::curr, sunos_dirent::d_ino, sunos_dirent::d_name, sunos_dirent::d_namlen, sunos_dirent::d_off, sunos_dirent::d_reclen, EINVAL, sunos_dirent_callback::error, NAME_OFFSET, sunos_dirent_callback::previous, put_user, and ROUND_UP.

Referenced by sunos_getdents().

static int sunos_filldirentry void *  __buf,
const char *  name,
int  namlen,
off_t  offset,
ino_t  ino
[static]
 

Definition at line 502 of file sys_sunos.c.

References buf, copy_to_user, sunos_direntry_callback::count, sunos_direntry_callback::curr, sunos_direntry::d_ino, sunos_direntry::d_name, sunos_direntry::d_namlen, sunos_direntry::d_reclen, EINVAL, sunos_direntry_callback::error, NAME_OFFSET, sunos_direntry_callback::previous, put_user, and ROUND_UP.

Referenced by sunos_getdirentries().

asmlinkage int sunos_fpathconf int  fd,
int  name
 

Definition at line 620 of file sys_sunos.c.

References _PCONF_CANON, _PCONF_CHRESTRICT, _PCONF_INPUT, _PCONF_LINK, _PCONF_NAME, _PCONF_NOTRUNC, _PCONF_PATH, _PCONF_PIPE, _PCONF_VDISABLE, EINVAL, LINK_MAX, lock_kernel, MAX_CANON, MAX_INPUT, NAME_MAX, PATH_MAX, PIPE_BUF, ret, and unlock_kernel.

Referenced by sunos_pathconf().

asmlinkage int sunos_getdents unsigned int  fd,
void *  dirent,
int  cnt
 

Definition at line 437 of file sys_sunos.c.

References sunos_dirent_callback::count, sunos_dirent_callback::curr, sunos_dirent::d_off, down(), EBADF, EINVAL, ENOTDIR, sunos_dirent_callback::error, error, fget(), file, fput(), lock_kernel, NULL, out, sunos_dirent_callback::previous, put_user, sunos_filldir(), SUNOS_NR_OPEN, unlock_kernel, and up.

Here is the call graph for this function:

asmlinkage int sunos_getdirentries unsigned int  fd,
void *  dirent,
int  cnt,
unsigned int *  basep
 

Definition at line 526 of file sys_sunos.c.

References sunos_direntry_callback::count, sunos_direntry_callback::curr, down(), EBADF, EINVAL, ENOTDIR, sunos_direntry_callback::error, error, fget(), file, fput(), lock_kernel, NULL, out, sunos_direntry_callback::previous, put_user, sunos_filldirentry(), SUNOS_NR_OPEN, unlock_kernel, and up.

Here is the call graph for this function:

asmlinkage long sunos_getdtablesize void   ) 
 

Definition at line 359 of file sys_sunos.c.

References SUNOS_NR_OPEN.

asmlinkage unsigned long sunos_gethostid void   ) 
 

Definition at line 956 of file sys_sunos.c.

References lock_kernel, long, ret, and unlock_kernel.

asmlinkage int sunos_getsockopt int  fd,
int  level,
int  optname,
char *  optval,
int *  optlen
 

Definition at line 1351 of file sys_sunos.c.

References lock_kernel, ret, SOL_IP, sys_getsockopt, and unlock_kernel.

Referenced by solaris_getsockopt().

asmlinkage int sunos_killpg int  pgrp,
int  sig
 

Definition at line 938 of file sys_sunos.c.

References kill_pg(), lock_kernel, ret, and unlock_kernel.

Here is the call graph for this function:

asmlinkage void sunos_madvise unsigned long  address,
unsigned long  len,
unsigned long  strategy
 

Definition at line 292 of file sys_sunos.c.

References current, lock_kernel, mstrings, printk, and unlock_kernel.

asmlinkage int sunos_mctl unsigned long  addr,
unsigned long  len,
int  function,
char *  arg
 

Definition at line 136 of file sys_sunos.c.

asmlinkage int sunos_mincore unsigned long  addr,
unsigned long  len,
char *  array
 

Definition at line 314 of file sys_sunos.c.

References __put_user, current, EFAULT, EINVAL, ENOMEM, limit(), lock_kernel, num_pages, out, PAGE_MASK, PAGE_OFFSET, PAGE_SIZE, pgd_none, pgd_offset, pmd_none, pmd_offset, pte_none, pte_offset, pte_present, unlock_kernel, verify_area(), and VERIFY_WRITE.

Here is the call graph for this function:

asmlinkage unsigned long sunos_mmap unsigned long  addr,
unsigned long  len,
unsigned long  prot,
unsigned long  flags,
unsigned long  fd,
unsigned long  off
 

Definition at line 63 of file sys_sunos.c.

References _MAP_NEW, ARCH_SUN4C_SUN4, current, do_mmap(), down(), EBADF, EINVAL, ENOMEM, fget(), file, fput(), get_unmapped_area(), lock_kernel, MAJOR, MAP_ANONYMOUS, MAP_DENYWRITE, MAP_EXECUTABLE, MAP_FIXED, MAP_NORESERVE, MEM_MAJOR, MINOR, NULL, out, PAGE_OFFSET, PAGE_SIZE, PER_BSD, printk, SUNOS_NR_OPEN, TASK_SIZE, unlock_kernel, and up.

Here is the call graph for this function:

asmlinkage int sunos_mount char *  type,
char *  dir,
int  flags,
void *  data
 

Definition at line 858 of file sys_sunos.c.

References CAP_SYS_ADMIN, capable, EINVAL, ENODEV, EPERM, lock_kernel, MS_MGC_MSK, MS_NOSUID, MS_RDONLY, MS_REMOUNT, NULL, out, printk, ret, SMNT_GRPID, SMNT_MULTI, SMNT_NEWTYPE, SMNT_NOSUB, SMNT_NOSUID, SMNT_RDONLY, SMNT_REMOUNT, SMNT_SYS5, strcmp, sunos_nfs_mount(), sys_mount, and unlock_kernel.

Referenced by sunos_nfs_mount().

Here is the call graph for this function:

asmlinkage int sunos_msgsys