Author: avg
Date: Sun Nov  1 17:15:38 2009
New Revision: 198755
URL: http://svn.freebsd.org/changeset/base/198755

Log:
  MFC 196399: fstat: fix fsid comparison on systems with 64-bit long

Modified:
  stable/7/usr.bin/fstat/   (props changed)
  stable/7/usr.bin/fstat/fstat.c
  stable/7/usr.bin/fstat/zfs.c

Modified: stable/7/usr.bin/fstat/fstat.c
==============================================================================
--- stable/7/usr.bin/fstat/fstat.c      Sun Nov  1 17:05:08 2009        
(r198754)
+++ stable/7/usr.bin/fstat/fstat.c      Sun Nov  1 17:15:38 2009        
(r198755)
@@ -649,7 +649,7 @@ devfs_filestat(struct vnode *vp, struct 
                    (void *)devfs_dirent.de_vnode, Pid);
                return 0;
        }
-       fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0];
+       fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0];
        fsp->fileid = devfs_dirent.de_inode;
        fsp->mode = (devfs_dirent.de_mode & ~S_IFMT) | S_IFCHR;
        fsp->size = 0;

Modified: stable/7/usr.bin/fstat/zfs.c
==============================================================================
--- stable/7/usr.bin/fstat/zfs.c        Sun Nov  1 17:05:08 2009        
(r198754)
+++ stable/7/usr.bin/fstat/zfs.c        Sun Nov  1 17:15:38 2009        
(r198755)
@@ -117,7 +117,7 @@ zfs_filestat(struct vnode *vp, struct fi
                goto bad;
        }
 
-       fsp->fsid = (long)mount.mnt_stat.f_fsid.val[0];
+       fsp->fsid = (long)(uint32_t)mount.mnt_stat.f_fsid.val[0];
        fsp->fileid = *zid;
        /*
         * XXX: Shows up wrong in output, but UFS has this error too. Could
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to