Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs Fill in the lfs_fsmnt field in the superblock wh...



details:   https://anonhg.NetBSD.org/src/rev/9a34253512fb
branches:  trunk
changeset: 581027:9a34253512fb
user:      perseant <perseant%NetBSD.org@localhost>
date:      Fri May 20 19:03:11 2005 +0000

description:
Fill in the lfs_fsmnt field in the superblock when we mount the filesystem,
so fsck(8) can tell where it was last mounted.

diffstat:

 sys/ufs/lfs/lfs_vfsops.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 6679e32b8a5c -r 9a34253512fb sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Fri May 20 18:59:36 2005 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Fri May 20 19:03:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.178 2005/05/04 04:58:22 perseant Exp $        */
+/*     $NetBSD: lfs_vfsops.c,v 1.179 2005/05/20 19:03:11 perseant Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.178 2005/05/04 04:58:22 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.179 2005/05/20 19:03:11 perseant Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -486,8 +486,12 @@
                }
        }
 
-       return set_statvfs_info(path, UIO_USERSPACE, args.fspec,
+       error = set_statvfs_info(path, UIO_USERSPACE, args.fspec,
            UIO_USERSPACE, mp, p);
+       if (error == 0)
+               (void)strncpy(fs->lfs_fsmnt, mp->mnt_stat.f_mntonname,
+                             sizeof(fs->lfs_fsmnt));
+       return error;
 
 fail:
        vrele(devvp);



Home | Main Index | Thread Index | Old Index