Source-Changes-HG archive

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

[src/trunk]: src/sbin/fsck_lfs ufs -> ulfs for fsck_lfs.



details:   https://anonhg.NetBSD.org/src/rev/41e8e41de1d8
branches:  trunk
changeset: 787207:41e8e41de1d8
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Jun 06 00:52:50 2013 +0000

description:
ufs -> ulfs for fsck_lfs.

diffstat:

 sbin/fsck_lfs/dir.c       |  48 ++++++++++++------------
 sbin/fsck_lfs/extern.h    |   8 ++--
 sbin/fsck_lfs/fsck.h      |   6 +-
 sbin/fsck_lfs/fsck_vars.h |   4 +-
 sbin/fsck_lfs/inode.c     |  56 ++++++++++++++--------------
 sbin/fsck_lfs/lfs.c       |  90 +++++++++++++++++++++++-----------------------
 sbin/fsck_lfs/lfs_user.h  |  14 +++---
 sbin/fsck_lfs/main.c      |   8 ++--
 sbin/fsck_lfs/pass0.c     |   8 ++--
 sbin/fsck_lfs/pass1.c     |  36 +++++++++---------
 sbin/fsck_lfs/pass2.c     |  42 ++++++++++----------
 sbin/fsck_lfs/pass3.c     |   6 +-
 sbin/fsck_lfs/pass4.c     |   8 ++--
 sbin/fsck_lfs/pass5.c     |   8 ++--
 sbin/fsck_lfs/pass6.c     |  64 ++++++++++++++++----------------
 sbin/fsck_lfs/segwrite.c  |  64 ++++++++++++++++----------------
 sbin/fsck_lfs/segwrite.h  |  10 ++--
 sbin/fsck_lfs/setup.c     |  14 +++---
 sbin/fsck_lfs/utilities.c |  14 +++---
 sbin/fsck_lfs/vars.c      |   8 ++--
 sbin/fsck_lfs/vnode.c     |   6 +-
 21 files changed, 261 insertions(+), 261 deletions(-)

diffs (truncated from 1792 to 300 lines):

diff -r a5154f2658a3 -r 41e8e41de1d8 sbin/fsck_lfs/dir.c
--- a/sbin/fsck_lfs/dir.c       Thu Jun 06 00:52:14 2013 +0000
+++ b/sbin/fsck_lfs/dir.c       Thu Jun 06 00:52:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.26 2013/01/22 09:39:12 dholland Exp $     */
+/* $NetBSD: dir.c,v 1.27 2013/06/06 00:52:50 dholland Exp $     */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -35,9 +35,9 @@
 #include <sys/buf.h>
 #include <sys/mount.h>
 
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/dir.h>
-#include <ufs/ufs/ufsmount.h>
+#include <ufs/lfs/ulfs_inode.h>
+#include <ufs/lfs/ulfs_dir.h>
+#include <ufs/lfs/ulfsmount.h>
 #include <ufs/lfs/lfs.h>
 
 #include <err.h>
@@ -82,7 +82,7 @@
        .dotdot_name = ".."
 };
 
-static int expanddir(struct uvnode *, struct ufs1_dinode *, char *);
+static int expanddir(struct uvnode *, struct ulfs1_dinode *, char *);
 static void freedir(ino_t, ino_t);
 static struct direct *fsck_readdir(struct uvnode *, struct inodesc *);
 static int lftempname(char *, ino_t);
@@ -105,14 +105,14 @@
        for (inpp = inpsort; inpp < inpend; inpp++) {
                inp = *inpp;
                if (inp->i_parent == 0 ||
-                   inp->i_number == UFS_ROOTINO)
+                   inp->i_number == ULFS_ROOTINO)
                        continue;
                pinp = getinoinfo(inp->i_parent);
                inp->i_parentp = pinp;
                inp->i_sibling = pinp->i_child;
                pinp->i_child = inp;
        }
-       inp = getinoinfo(UFS_ROOTINO);
+       inp = getinoinfo(ULFS_ROOTINO);
        while (inp) {
                statemap[inp->i_number] = DFOUND;
                if (inp->i_child &&
@@ -307,7 +307,7 @@
        printf("\n");
        pwarn("PARENT=%lld\n", (long long)cwd);
        getpathname(pathbuf, sizeof(pathbuf), cwd, ino);
-       if (ino < UFS_ROOTINO || ino >= maxino) {
+       if (ino < ULFS_ROOTINO || ino >= maxino) {
                pfatal("NAME=%s\n", pathbuf);
                return;
        }
@@ -328,7 +328,7 @@
 adjust(struct inodesc *idesc, short lcnt)
 {
        struct uvnode *vp;
-       struct ufs1_dinode *dp;
+       struct ulfs1_dinode *dp;
 
        vp = vget(fs, idesc->id_number);
        dp = VTOD(vp);
@@ -396,7 +396,7 @@
 int
 linkup(ino_t orphan, ino_t parentdir)
 {
-       struct ufs1_dinode *dp;
+       struct ulfs1_dinode *dp;
        int lostdir;
        ino_t oldlfdir;
        struct inodesc idesc;
@@ -416,23 +416,23 @@
        else if (reply("RECONNECT") == 0)
                return (0);
        if (lfdir == 0) {
-               dp = ginode(UFS_ROOTINO);
+               dp = ginode(ULFS_ROOTINO);
                idesc.id_name = lfname;
                idesc.id_type = DATA;
                idesc.id_func = findino;
-               idesc.id_number = UFS_ROOTINO;
+               idesc.id_number = ULFS_ROOTINO;
                if ((ckinode(dp, &idesc) & FOUND) != 0) {
                        lfdir = idesc.id_parent;
                } else {
                        pwarn("NO lost+found DIRECTORY");
                        if (preen || reply("CREATE")) {
-                               lfdir = allocdir(UFS_ROOTINO, (ino_t) 0, lfmode);
+                               lfdir = allocdir(ULFS_ROOTINO, (ino_t) 0, lfmode);
                                if (lfdir != 0) {
-                                       if (makeentry(UFS_ROOTINO, lfdir, lfname) != 0) {
+                                       if (makeentry(ULFS_ROOTINO, lfdir, lfname) != 0) {
                                                if (preen)
                                                        printf(" (CREATED)\n");
                                        } else {
-                                               freedir(lfdir, UFS_ROOTINO);
+                                               freedir(lfdir, ULFS_ROOTINO);
                                                lfdir = 0;
                                                if (preen)
                                                        printf("\n");
@@ -453,11 +453,11 @@
                if (reply("REALLOCATE") == 0)
                        return (0);
                oldlfdir = lfdir;
-               if ((lfdir = allocdir(UFS_ROOTINO, (ino_t) 0, lfmode)) == 0) {
+               if ((lfdir = allocdir(ULFS_ROOTINO, (ino_t) 0, lfmode)) == 0) {
                        pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY\n\n");
                        return (0);
                }
-               if ((changeino(UFS_ROOTINO, lfname, lfdir) & ALTERED) == 0) {
+               if ((changeino(ULFS_ROOTINO, lfname, lfdir) & ALTERED) == 0) {
                        pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY\n\n");
                        return (0);
                }
@@ -524,13 +524,13 @@
 int
 makeentry(ino_t parent, ino_t ino, const char *name)
 {
-       struct ufs1_dinode *dp;
+       struct ulfs1_dinode *dp;
        struct inodesc idesc;
        char pathbuf[MAXPATHLEN + 1];
        struct uvnode *vp;
 
-       if (parent < UFS_ROOTINO || parent >= maxino ||
-           ino < UFS_ROOTINO || ino >= maxino)
+       if (parent < ULFS_ROOTINO || parent >= maxino ||
+           ino < ULFS_ROOTINO || ino >= maxino)
                return (0);
        memset(&idesc, 0, sizeof(struct inodesc));
        idesc.id_type = DATA;
@@ -559,14 +559,14 @@
  * Attempt to expand the size of a directory
  */
 static int
-expanddir(struct uvnode *vp, struct ufs1_dinode *dp, char *name)
+expanddir(struct uvnode *vp, struct ulfs1_dinode *dp, char *name)
 {
        daddr_t lastbn;
        struct ubuf *bp;
        char *cp, firstblk[DIRBLKSIZ];
 
        lastbn = lblkno(fs, dp->di_size);
-       if (lastbn >= UFS_NDADDR - 1 || dp->di_db[lastbn] == 0 || dp->di_size == 0)
+       if (lastbn >= ULFS_NDADDR - 1 || dp->di_db[lastbn] == 0 || dp->di_size == 0)
                return (0);
        dp->di_db[lastbn + 1] = dp->di_db[lastbn];
        dp->di_db[lastbn] = 0;
@@ -617,7 +617,7 @@
 {
        ino_t ino;
        char *cp;
-       struct ufs1_dinode *dp;
+       struct ulfs1_dinode *dp;
        struct ubuf *bp;
        struct dirtemplate *dirp;
        struct uvnode *vp;
@@ -642,7 +642,7 @@
        VOP_BWRITE(bp);
        dp->di_nlink = 2;
        inodirty(VTOI(vp));
-       if (ino == UFS_ROOTINO) {
+       if (ino == ULFS_ROOTINO) {
                lncntp[ino] = dp->di_nlink;
                cacheino(dp, ino);
                return (ino);
diff -r a5154f2658a3 -r 41e8e41de1d8 sbin/fsck_lfs/extern.h
--- a/sbin/fsck_lfs/extern.h    Thu Jun 06 00:52:14 2013 +0000
+++ b/sbin/fsck_lfs/extern.h    Thu Jun 06 00:52:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.9 2011/06/09 19:57:53 christos Exp $   */
+/* $NetBSD: extern.h,v 1.10 2013/06/06 00:52:50 dholland Exp $  */
 
 /*
  * Copyright (c) 1994 James A. Jegers
@@ -28,13 +28,13 @@
 int allocblk(long);
 int allocdir(ino_t, ino_t, int);
 void blkerror(ino_t, const char *, daddr_t);
-void cacheino(struct ufs1_dinode *, ino_t);
+void cacheino(struct ulfs1_dinode *, ino_t);
 int changeino(ino_t, const char *, ino_t);
 struct fstab;
 void checkinode(ino_t, struct inodesc *);
 int chkrange(daddr_t, int);
 void ckfini(int);
-int ckinode(struct ufs1_dinode *, struct inodesc *);
+int ckinode(struct ulfs1_dinode *, struct inodesc *);
 void clri(struct inodesc *, const char *, int);
 int dircheck(struct inodesc *, struct direct *);
 void direrror(ino_t, const char *);
@@ -47,7 +47,7 @@
 void freeblk(daddr_t, long);
 void freeino(ino_t);
 void freeinodebuf(void);
-int ftypeok(struct ufs1_dinode *);
+int ftypeok(struct ulfs1_dinode *);
 void getpathname(char *, size_t, ino_t, ino_t);
 void inocleanup(void);
 void inodirty(struct inode *);
diff -r a5154f2658a3 -r 41e8e41de1d8 sbin/fsck_lfs/fsck.h
--- a/sbin/fsck_lfs/fsck.h      Thu Jun 06 00:52:14 2013 +0000
+++ b/sbin/fsck_lfs/fsck.h      Thu Jun 06 00:52:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.18 2008/10/09 16:56:23 christos Exp $    */
+/* $NetBSD: fsck.h,v 1.19 2013/06/06 00:52:50 dholland Exp $    */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
                int32_t *b_indir;       /* indirect block */
                struct lfs *b_fs;       /* super block */
                struct cg *b_cg;/* cylinder group */
-               struct ufs1_dinode *b_dinode;   /* inode block */
+               struct ulfs1_dinode *b_dinode;  /* inode block */
        }     b_un;
        char b_dirty;
 };
@@ -206,7 +206,7 @@
 
 ino_t allocino(ino_t, int);
 int ino_to_fsba(struct lfs *, ino_t);
-struct ufs1_dinode *ginode(ino_t);
+struct ulfs1_dinode *ginode(ino_t);
 struct inoinfo *getinoinfo(ino_t);
 daddr_t lfs_ino_daddr(ino_t);
 void clearinode(ino_t);
diff -r a5154f2658a3 -r 41e8e41de1d8 sbin/fsck_lfs/fsck_vars.h
--- a/sbin/fsck_lfs/fsck_vars.h Thu Jun 06 00:52:14 2013 +0000
+++ b/sbin/fsck_lfs/fsck_vars.h Thu Jun 06 00:52:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck_vars.h,v 1.12 2006/09/01 19:52:48 perseant Exp $       */
+/* $NetBSD: fsck_vars.h,v 1.13 2013/06/06 00:52:50 dholland Exp $       */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -76,6 +76,6 @@
 extern daddr_t n_blks;         /* number of blocks in use */
 extern ino_t n_files;          /* number of files in use */
 
-extern struct ufs1_dinode zino;
+extern struct ulfs1_dinode zino;
 
 extern int no_roll_forward;    /* Don't roll forward */
diff -r a5154f2658a3 -r 41e8e41de1d8 sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c     Thu Jun 06 00:52:14 2013 +0000
+++ b/sbin/fsck_lfs/inode.c     Thu Jun 06 00:52:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.43 2013/01/22 09:39:12 dholland Exp $   */
+/* $NetBSD: inode.c,v 1.44 2013/06/06 00:52:50 dholland Exp $   */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -64,8 +64,8 @@
 #include <sys/buf.h>
 #include <sys/mount.h>
 
-#include <ufs/ufs/inode.h>
-#include <ufs/ufs/dir.h>
+#include <ufs/lfs/ulfs_inode.h>
+#include <ufs/lfs/ulfs_dir.h>
 #define vnode uvnode
 #include <ufs/lfs/lfs.h>
 #undef vnode
@@ -88,7 +88,7 @@
 #include "extern.h"
 
 extern SEGUSE *seg_table;
-extern ufs_daddr_t *din_table;
+extern ulfs_daddr_t *din_table;
 
 static int iblock(struct inodesc *, long, u_int64_t);
 int blksreqd(struct lfs *, int);
@@ -98,7 +98,7 @@
  * Get a dinode of a given inum.
  * XXX combine this function with vget.
  */
-struct ufs1_dinode *
+struct ulfs1_dinode *
 ginode(ino_t ino)
 {
        struct uvnode *vp;
@@ -122,11 +122,11 @@
  * Check validity of held blocks in an inode, recursing through all blocks.
  */
 int
-ckinode(struct ufs1_dinode *dp, struct inodesc *idesc)
+ckinode(struct ulfs1_dinode *dp, struct inodesc *idesc)
 {
-       ufs_daddr_t *ap, lbn;
+       ulfs_daddr_t *ap, lbn;
        long ret, n, ndb, offset;
-       struct ufs1_dinode dino;
+       struct ulfs1_dinode dino;
        u_int64_t remsize, sizepb;
        mode_t mode;



Home | Main Index | Thread Index | Old Index