Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src struct direct -> struct lfs_direct
details: https://anonhg.NetBSD.org/src/rev/ca15484a80f6
branches: trunk
changeset: 787242:ca15484a80f6
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Jun 08 02:12:56 2013 +0000
description:
struct direct -> struct lfs_direct
struct dirtemplate -> struct lfs_dirtemplate
struct odirtemplate -> struct lfs_odirtemplate
DT_* -> LFS_DT_*
diffstat:
sbin/fsck_lfs/dir.c | 46 +++++++++++++++++++-------------------
sbin/fsck_lfs/extern.h | 4 +-
sbin/fsck_lfs/fsck.h | 4 +-
sbin/fsck_lfs/inode.c | 6 ++--
sbin/fsck_lfs/pass2.c | 36 +++++++++++++++---------------
sbin/newfs_lfs/make_lfs.c | 28 +++++++++++-----------
sys/ufs/lfs/ulfs_dinode.h | 4 +-
sys/ufs/lfs/ulfs_dir.h | 32 +++++++++++++-------------
sys/ufs/lfs/ulfs_dirhash.c | 38 ++++++++++++++++----------------
sys/ufs/lfs/ulfs_dirhash.h | 8 +++---
sys/ufs/lfs/ulfs_extern.h | 14 +++++-----
sys/ufs/lfs/ulfs_lookup.c | 54 +++++++++++++++++++++++-----------------------
sys/ufs/lfs/ulfs_rename.c | 28 +++++++++++-----------
sys/ufs/lfs/ulfs_vfsops.c | 6 ++--
sys/ufs/lfs/ulfs_vnops.c | 30 ++++++++++++------------
15 files changed, 169 insertions(+), 169 deletions(-)
diffs (truncated from 1238 to 300 lines):
diff -r 3af18cb19d36 -r ca15484a80f6 sbin/fsck_lfs/dir.c
--- a/sbin/fsck_lfs/dir.c Sat Jun 08 02:11:49 2013 +0000
+++ b/sbin/fsck_lfs/dir.c Sat Jun 08 02:12:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.28 2013/06/08 02:11:11 dholland Exp $ */
+/* $NetBSD: dir.c,v 1.29 2013/06/08 02:12:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -55,23 +55,23 @@
const char *lfname = "lost+found";
int lfmode = 01700;
-struct dirtemplate emptydir = {
+struct lfs_dirtemplate emptydir = {
.dot_ino = 0,
.dot_reclen = DIRBLKSIZ,
};
-struct dirtemplate dirhead = {
+struct lfs_dirtemplate dirhead = {
.dot_ino = 0,
.dot_reclen = 12,
- .dot_type = DT_DIR,
+ .dot_type = LFS_DT_DIR,
.dot_namlen = 1,
.dot_name = ".",
.dotdot_ino = 0,
.dotdot_reclen = DIRBLKSIZ - 12,
- .dotdot_type = DT_DIR,
+ .dotdot_type = LFS_DT_DIR,
.dotdot_namlen = 2,
.dotdot_name = ".."
};
-struct odirtemplate odirhead = {
+struct lfs_odirtemplate odirhead = {
.dot_ino = 0,
.dot_reclen = 12,
.dot_namlen = 1,
@@ -84,7 +84,7 @@
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 struct lfs_direct *fsck_readdir(struct uvnode *, struct inodesc *);
static int lftempname(char *, ino_t);
static int mkentry(struct inodesc *);
static int chgino(struct inodesc *);
@@ -131,7 +131,7 @@
int
dirscan(struct inodesc *idesc)
{
- struct direct *dp;
+ struct lfs_direct *dp;
struct ubuf *bp;
int dsize, n;
long blksiz;
@@ -155,7 +155,7 @@
dp = fsck_readdir(vp, idesc)) {
dsize = dp->d_reclen;
memcpy(dbuf, dp, (size_t) dsize);
- idesc->id_dirp = (struct direct *) dbuf;
+ idesc->id_dirp = (struct lfs_direct *) dbuf;
if ((n = (*idesc->id_func) (idesc)) & ALTERED) {
bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
memcpy(bp->b_data + idesc->id_loc - dsize, dbuf,
@@ -172,10 +172,10 @@
/*
* get next entry in a directory.
*/
-static struct direct *
+static struct lfs_direct *
fsck_readdir(struct uvnode *vp, struct inodesc *idesc)
{
- struct direct *dp, *ndp;
+ struct lfs_direct *dp, *ndp;
struct ubuf *bp;
long size, blksiz, fix, dploc;
@@ -183,7 +183,7 @@
bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
if (idesc->id_loc % DIRBLKSIZ == 0 && idesc->id_filesize > 0 &&
idesc->id_loc < blksiz) {
- dp = (struct direct *) (bp->b_data + idesc->id_loc);
+ dp = (struct lfs_direct *) (bp->b_data + idesc->id_loc);
if (dircheck(idesc, dp))
goto dpok;
brelse(bp, 0);
@@ -191,7 +191,7 @@
return (0);
fix = dofix(idesc, "DIRECTORY CORRUPTED");
bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
- dp = (struct direct *) (bp->b_data + idesc->id_loc);
+ dp = (struct lfs_direct *) (bp->b_data + idesc->id_loc);
dp->d_reclen = DIRBLKSIZ;
dp->d_ino = 0;
dp->d_type = 0;
@@ -211,14 +211,14 @@
return NULL;
}
dploc = idesc->id_loc;
- dp = (struct direct *) (bp->b_data + dploc);
+ dp = (struct lfs_direct *) (bp->b_data + dploc);
idesc->id_loc += dp->d_reclen;
idesc->id_filesize -= dp->d_reclen;
if ((idesc->id_loc % DIRBLKSIZ) == 0) {
brelse(bp, 0);
return dp;
}
- ndp = (struct direct *) (bp->b_data + idesc->id_loc);
+ ndp = (struct lfs_direct *) (bp->b_data + idesc->id_loc);
if (idesc->id_loc < blksiz && idesc->id_filesize > 0 &&
dircheck(idesc, ndp) == 0) {
brelse(bp, 0);
@@ -229,7 +229,7 @@
return 0;
fix = dofix(idesc, "DIRECTORY CORRUPTED");
bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
- dp = (struct direct *) (bp->b_data + dploc);
+ dp = (struct lfs_direct *) (bp->b_data + dploc);
dp->d_reclen += size;
if (fix)
VOP_BWRITE(bp);
@@ -246,7 +246,7 @@
* This is a superset of the checks made in the kernel.
*/
int
-dircheck(struct inodesc *idesc, struct direct *dp)
+dircheck(struct inodesc *idesc, struct lfs_direct *dp)
{
int size;
char *cp;
@@ -358,8 +358,8 @@
static int
mkentry(struct inodesc *idesc)
{
- struct direct *dirp = idesc->id_dirp;
- struct direct newent;
+ struct lfs_direct *dirp = idesc->id_dirp;
+ struct lfs_direct newent;
int newlen, oldlen;
newent.d_namlen = strlen(idesc->id_name);
@@ -372,7 +372,7 @@
return (KEEPON);
newent.d_reclen = dirp->d_reclen - oldlen;
dirp->d_reclen = oldlen;
- dirp = (struct direct *) (((char *) dirp) + oldlen);
+ dirp = (struct lfs_direct *) (((char *) dirp) + oldlen);
dirp->d_ino = idesc->id_parent; /* ino to be entered is in id_parent */
dirp->d_reclen = newent.d_reclen;
dirp->d_type = typemap[idesc->id_parent];
@@ -384,7 +384,7 @@
static int
chgino(struct inodesc *idesc)
{
- struct direct *dirp = idesc->id_dirp;
+ struct lfs_direct *dirp = idesc->id_dirp;
if (memcmp(dirp->d_name, idesc->id_name, (int) dirp->d_namlen + 1))
return (KEEPON);
@@ -619,7 +619,7 @@
char *cp;
struct ulfs1_dinode *dp;
struct ubuf *bp;
- struct dirtemplate *dirp;
+ struct lfs_dirtemplate *dirp;
struct uvnode *vp;
ino = allocino(request, LFS_IFDIR | mode);
@@ -634,7 +634,7 @@
freeino(ino);
return (0);
}
- memcpy(bp->b_data, dirp, sizeof(struct dirtemplate));
+ memcpy(bp->b_data, dirp, sizeof(struct lfs_dirtemplate));
for (cp = &bp->b_data[DIRBLKSIZ];
cp < &bp->b_data[fs->lfs_fsize];
cp += DIRBLKSIZ)
diff -r 3af18cb19d36 -r ca15484a80f6 sbin/fsck_lfs/extern.h
--- a/sbin/fsck_lfs/extern.h Sat Jun 08 02:11:49 2013 +0000
+++ b/sbin/fsck_lfs/extern.h Sat Jun 08 02:12:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.10 2013/06/06 00:52:50 dholland Exp $ */
+/* $NetBSD: extern.h,v 1.11 2013/06/08 02:12:56 dholland Exp $ */
/*
* Copyright (c) 1994 James A. Jegers
@@ -36,7 +36,7 @@
void ckfini(int);
int ckinode(struct ulfs1_dinode *, struct inodesc *);
void clri(struct inodesc *, const char *, int);
-int dircheck(struct inodesc *, struct direct *);
+int dircheck(struct inodesc *, struct lfs_direct *);
void direrror(ino_t, const char *);
int dirscan(struct inodesc *);
int dofix(struct inodesc *, const char *);
diff -r 3af18cb19d36 -r ca15484a80f6 sbin/fsck_lfs/fsck.h
--- a/sbin/fsck_lfs/fsck.h Sat Jun 08 02:11:49 2013 +0000
+++ b/sbin/fsck_lfs/fsck.h Sat Jun 08 02:12:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.19 2013/06/06 00:52:50 dholland Exp $ */
+/* $NetBSD: fsck.h,v 1.20 2013/06/08 02:12:56 dholland Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -131,7 +131,7 @@
quad_t id_filesize; /* for DATA nodes, the size of the directory */
int id_loc; /* for DATA nodes, current location in dir */
int id_entryno; /* for DATA nodes, current entry number */
- struct direct *id_dirp; /* for DATA nodes, ptr to current entry */
+ struct lfs_direct *id_dirp; /* for DATA nodes, ptr to current entry */
const char *id_name; /* for DATA nodes, name to find or enter */
char id_type; /* type of descriptor, DATA or ADDR */
};
diff -r 3af18cb19d36 -r ca15484a80f6 sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c Sat Jun 08 02:11:49 2013 +0000
+++ b/sbin/fsck_lfs/inode.c Sat Jun 08 02:12:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.47 2013/06/08 02:11:11 dholland Exp $ */
+/* $NetBSD: inode.c,v 1.48 2013/06/08 02:12:56 dholland Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -486,7 +486,7 @@
int
findname(struct inodesc * idesc)
{
- struct direct *dirp = idesc->id_dirp;
+ struct lfs_direct *dirp = idesc->id_dirp;
size_t len;
char *buf;
@@ -505,7 +505,7 @@
int
findino(struct inodesc * idesc)
{
- struct direct *dirp = idesc->id_dirp;
+ struct lfs_direct *dirp = idesc->id_dirp;
if (dirp->d_ino == 0)
return (KEEPON);
diff -r 3af18cb19d36 -r ca15484a80f6 sbin/fsck_lfs/pass2.c
--- a/sbin/fsck_lfs/pass2.c Sat Jun 08 02:11:49 2013 +0000
+++ b/sbin/fsck_lfs/pass2.c Sat Jun 08 02:12:56 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass2.c,v 1.20 2013/06/08 02:11:11 dholland Exp $ */
+/* $NetBSD: pass2.c,v 1.21 2013/06/08 02:12:56 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -52,7 +52,7 @@
#include "fsutil.h"
#include "extern.h"
-#define MINDIRSIZE (sizeof (struct dirtemplate))
+#define MINDIRSIZE (sizeof (struct lfs_dirtemplate))
static int pass2check(struct inodesc *);
static int blksort(const void *, const void *);
@@ -115,7 +115,7 @@
errx(EEXIT, "BAD STATE %d FOR ROOT INODE\n", statemap[ULFS_ROOTINO]);
}
statemap[ULFS_WINO] = FSTATE;
- typemap[ULFS_WINO] = DT_WHT;
+ typemap[ULFS_WINO] = LFS_DT_WHT;
/*
* Sort the directory list into disk block order.
*/
@@ -201,12 +201,12 @@
static int
pass2check(struct inodesc * idesc)
{
- struct direct *dirp = idesc->id_dirp;
+ struct lfs_direct *dirp = idesc->id_dirp;
struct inoinfo *inp;
int n, entrysize, ret = 0;
struct ulfs1_dinode *dp;
const char *errmsg;
- struct direct proto;
+ struct lfs_direct proto;
char namebuf[MAXPATHLEN + 1];
char pathbuf[MAXPATHLEN + 1];
@@ -222,9 +222,9 @@
if (reply("FIX") == 1)
ret |= ALTERED;
}
- if (dirp->d_type != DT_DIR) {
+ if (dirp->d_type != LFS_DT_DIR) {
direrror(idesc->id_number, "BAD TYPE VALUE FOR '.'");
- dirp->d_type = DT_DIR;
+ dirp->d_type = LFS_DT_DIR;
if (reply("FIX") == 1)
ret |= ALTERED;
}
@@ -232,7 +232,7 @@
}
direrror(idesc->id_number, "MISSING '.'");
proto.d_ino = idesc->id_number;
- proto.d_type = DT_DIR;
Home |
Main Index |
Thread Index |
Old Index