linux_stats.c (9313) | linux_stats.c (10358) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $Id: linux_stats.c,v 1.3 1995/06/08 13:50:52 sos Exp $ | 28 * $Id: linux_stats.c,v 1.1 1995/06/25 17:32:42 sos Exp $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/dirent.h> 34#include <sys/file.h> 35#include <sys/filedesc.h> 36#include <sys/proc.h> --- 164 unchanged lines hidden (view full) --- 201 struct nameidata nd; 202 struct linux_statfs linux_statfs; 203 int error; 204 205#ifdef DEBUG 206 printf("Linux-emul(%d): statfs(%s, *)\n", p->p_pid, args->path); 207#endif 208 ndp = &nd; | 29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/dirent.h> 34#include <sys/file.h> 35#include <sys/filedesc.h> 36#include <sys/proc.h> --- 164 unchanged lines hidden (view full) --- 201 struct nameidata nd; 202 struct linux_statfs linux_statfs; 203 int error; 204 205#ifdef DEBUG 206 printf("Linux-emul(%d): statfs(%s, *)\n", p->p_pid, args->path); 207#endif 208 ndp = &nd; |
209 ndp->ni_cnd.cn_nameiop = LOOKUP; 210 ndp->ni_cnd.cn_flags = FOLLOW; 211 ndp->ni_cnd.cn_proc = curproc; 212 ndp->ni_cnd.cn_cred = curproc->p_cred->pc_ucred; 213 ndp->ni_segflg = UIO_USERSPACE; 214 ndp->ni_dirp = args->path; | 209 NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args->path, curproc); |
215 if (error = namei(ndp)) 216 return error; 217 mp = ndp->ni_vp->v_mount; 218 bsd_statfs = &mp->mnt_stat; 219 vrele(ndp->ni_vp); 220 if (error = VFS_STATFS(mp, bsd_statfs, p)) 221 return error; 222 bsd_statfs->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; --- 51 unchanged lines hidden --- | 210 if (error = namei(ndp)) 211 return error; 212 mp = ndp->ni_vp->v_mount; 213 bsd_statfs = &mp->mnt_stat; 214 vrele(ndp->ni_vp); 215 if (error = VFS_STATFS(mp, bsd_statfs, p)) 216 return error; 217 bsd_statfs->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; --- 51 unchanged lines hidden --- |