[BACK]Return to linux_file.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / compat / linux / common

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/compat/linux/common/linux_file.c between version 1.87 and 1.88

version 1.87, 2007/12/04 18:40:15 version 1.88, 2007/12/08 18:36:07
Line 94  static int linux_stat1(struct lwp *, voi
Line 94  static int linux_stat1(struct lwp *, voi
  * of the flags used in open(2) and fcntl(2).   * of the flags used in open(2) and fcntl(2).
  */   */
 static int  static int
 linux_to_bsd_ioflags(lflags)  linux_to_bsd_ioflags(int lflags)
         int lflags;  
 {  {
         int res = 0;          int res = 0;
   
Line 115  linux_to_bsd_ioflags(lflags)
Line 114  linux_to_bsd_ioflags(lflags)
 }  }
   
 static int  static int
 bsd_to_linux_ioflags(bflags)  bsd_to_linux_ioflags(int bflags)
         int bflags;  
 {  {
         int res = 0;          int res = 0;
   
Line 145  bsd_to_linux_ioflags(bflags)
Line 143  bsd_to_linux_ioflags(bflags)
  * Just call open(2) with the TRUNC, CREAT and WRONLY flags.   * Just call open(2) with the TRUNC, CREAT and WRONLY flags.
  */   */
 int  int
 linux_sys_creat(l, v, retval)  linux_sys_creat(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_creat_args /* {          struct linux_sys_creat_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 170  linux_sys_creat(l, v, retval)
Line 165  linux_sys_creat(l, v, retval)
  * (XXX is this necessary?)   * (XXX is this necessary?)
  */   */
 int  int
 linux_sys_open(l, v, retval)  linux_sys_open(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_open_args /* {          struct linux_sys_open_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 225  linux_sys_open(l, v, retval)
Line 217  linux_sys_open(l, v, retval)
  * the fields, and the 'whence' value.   * the fields, and the 'whence' value.
  */   */
 static void  static void
 bsd_to_linux_flock(bfp, lfp)  bsd_to_linux_flock(struct flock *bfp, struct linux_flock *lfp)
         struct flock *bfp;  
         struct linux_flock *lfp;  
 {  {
   
         lfp->l_start = bfp->l_start;          lfp->l_start = bfp->l_start;
Line 248  bsd_to_linux_flock(bfp, lfp)
Line 238  bsd_to_linux_flock(bfp, lfp)
 }  }
   
 static void  static void
 linux_to_bsd_flock(lfp, bfp)  linux_to_bsd_flock(struct linux_flock *lfp, struct flock *bfp)
         struct linux_flock *lfp;  
         struct flock *bfp;  
 {  {
   
         bfp->l_start = lfp->l_start;          bfp->l_start = lfp->l_start;
Line 277  linux_to_bsd_flock(lfp, bfp)
Line 265  linux_to_bsd_flock(lfp, bfp)
  * because the flag values and lock structure are different.   * because the flag values and lock structure are different.
  */   */
 int  int
 linux_sys_fcntl(l, v, retval)  linux_sys_fcntl(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_fcntl_args /* {          struct linux_sys_fcntl_args /* {
                 syscallarg(int) fd;                  syscallarg(int) fd;
Line 478  linux_sys_fcntl(l, v, retval)
Line 463  linux_sys_fcntl(l, v, retval)
  * things against constant major device numbers? sigh)   * things against constant major device numbers? sigh)
  */   */
 static void  static void
 bsd_to_linux_stat(bsp, lsp)  bsd_to_linux_stat(struct stat *bsp, struct linux_stat *lsp)
         struct stat *bsp;  
         struct linux_stat *lsp;  
 {  {
   
         lsp->lst_dev     = linux_fakedev(bsp->st_dev, 0);          lsp->lst_dev     = linux_fakedev(bsp->st_dev, 0);
Line 511  bsd_to_linux_stat(bsp, lsp)
Line 494  bsd_to_linux_stat(bsp, lsp)
  * by one function to avoid code duplication.   * by one function to avoid code duplication.
  */   */
 int  int
 linux_sys_fstat(l, v, retval)  linux_sys_fstat(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_fstat_args /* {          struct linux_sys_fstat_args /* {
                 syscallarg(int) fd;                  syscallarg(int) fd;
Line 533  linux_sys_fstat(l, v, retval)
Line 513  linux_sys_fstat(l, v, retval)
 }  }
   
 static int  static int
 linux_stat1(l, v, retval, flags)  linux_stat1(struct lwp *l, void *v, register_t *retval, int flags)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
         int flags;  
 {  {
         struct linux_stat tmplst;          struct linux_stat tmplst;
         struct stat tmpst;          struct stat tmpst;
Line 554  linux_stat1(l, v, retval, flags)
Line 530  linux_stat1(l, v, retval, flags)
 }  }
   
 int  int
 linux_sys_stat(l, v, retval)  linux_sys_stat(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_stat_args /* {          struct linux_sys_stat_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 570  linux_sys_stat(l, v, retval)
Line 543  linux_sys_stat(l, v, retval)
 /* Note: this is "newlstat" in the Linux sources */  /* Note: this is "newlstat" in the Linux sources */
 /*      (we don't bother with the old lstat currently) */  /*      (we don't bother with the old lstat currently) */
 int  int
 linux_sys_lstat(l, v, retval)  linux_sys_lstat(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_lstat_args /* {          struct linux_sys_lstat_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 626  linux_sys_unlink(l, v, retval)
Line 596  linux_sys_unlink(l, v, retval)
 }  }
   
 int  int
 linux_sys_mknod(l, v, retval)  linux_sys_mknod(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_mknod_args /* {          struct linux_sys_mknod_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 665  linux_sys_mknod(l, v, retval)
Line 632  linux_sys_mknod(l, v, retval)
 #if defined(__i386__) || defined(__m68k__) || \  #if defined(__i386__) || defined(__m68k__) || \
     defined(__arm__)      defined(__arm__)
 int  int
 linux_sys_chown16(l, v, retval)  linux_sys_chown16(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_chown16_args /* {          struct linux_sys_chown16_args /* {
                 syscallarg(const char *) path;                  syscallarg(const char *) path;
Line 687  linux_sys_chown16(l, v, retval)
Line 651  linux_sys_chown16(l, v, retval)
 }  }
   
 int  int
 linux_sys_fchown16(l, v, retval)  linux_sys_fchown16(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_fchown16_args /* {          struct linux_sys_fchown16_args /* {
                 syscallarg(int) fd;                  syscallarg(int) fd;
Line 709  linux_sys_fchown16(l, v, retval)
Line 670  linux_sys_fchown16(l, v, retval)
 }  }
   
 int  int
 linux_sys_lchown16(l, v, retval)  linux_sys_lchown16(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_lchown16_args /* {          struct linux_sys_lchown16_args /* {
                 syscallarg(char *) path;                  syscallarg(char *) path;
Line 738  linux_sys_lchown16(l, v, retval)
Line 696  linux_sys_lchown16(l, v, retval)
  *      (syscall #148 on the arm)   *      (syscall #148 on the arm)
  */   */
 int  int
 linux_sys_fdatasync(l, v, retval)  linux_sys_fdatasync(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
 #ifdef notdef  #ifdef notdef
         struct linux_sys_fdatasync_args /* {          struct linux_sys_fdatasync_args /* {
Line 755  linux_sys_fdatasync(l, v, retval)
Line 710  linux_sys_fdatasync(l, v, retval)
  * pread(2).   * pread(2).
  */   */
 int  int
 linux_sys_pread(l, v, retval)  linux_sys_pread(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_pread_args /* {          struct linux_sys_pread_args /* {
                 syscallarg(int) fd;                  syscallarg(int) fd;
Line 780  linux_sys_pread(l, v, retval)
Line 732  linux_sys_pread(l, v, retval)
  * pwrite(2).   * pwrite(2).
  */   */
 int  int
 linux_sys_pwrite(l, v, retval)  linux_sys_pwrite(struct lwp *l, void *v, register_t *retval)
         struct lwp *l;  
         void *v;  
         register_t *retval;  
 {  {
         struct linux_sys_pwrite_args /* {          struct linux_sys_pwrite_args /* {
                 syscallarg(int) fd;                  syscallarg(int) fd;

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88

CVSweb <webmaster@jp.NetBSD.org>