summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/inode.c
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2013-03-23 04:26:13 +0000
committersbruno <sbruno@FreeBSD.org>2013-03-23 04:26:13 +0000
commitee156374eead97ea0d36a374d0a9ccb6d2ed7e40 (patch)
tree0919d525762dd205d22121917dfe139e9308d76c /sbin/fsck_ffs/inode.c
parent1bcec8f048d439f4090ca60786176dd52dbe87b1 (diff)
downloadFreeBSD-src-ee156374eead97ea0d36a374d0a9ccb6d2ed7e40.zip
FreeBSD-src-ee156374eead97ea0d36a374d0a9ccb6d2ed7e40.tar.gz
Revert svn r248625
Clang errors around printf could be trivially fixed, but the breakage in sbin/fsdb were to significant for this type of change. Submitter of this changeset has been notified and hopefully this can be restored soon.
Diffstat (limited to 'sbin/fsck_ffs/inode.c')
-rw-r--r--sbin/fsck_ffs/inode.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index e8baf09..fd98575 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -423,7 +423,7 @@ setinodebuf(ino_t inum)
partialsize = inobufsize;
}
initbarea(&inobuf, BT_INODES);
- if ((inobuf.b_un.b_buf = Malloc((unsigned)inobufsize)) == NULL)
+ if ((inobuf.b_un.b_buf = malloc((unsigned)inobufsize)) == NULL)
errx(EEXIT, "cannot allocate space for inode buffer");
}
@@ -454,7 +454,7 @@ cacheino(union dinode *dp, ino_t inumber)
else
blks = howmany(DIP(dp, di_size), sblock.fs_bsize);
inp = (struct inoinfo *)
- Malloc(sizeof(*inp) + (blks - 1) * sizeof(ufs2_daddr_t));
+ malloc(sizeof(*inp) + (blks - 1) * sizeof(ufs2_daddr_t));
if (inp == NULL)
errx(EEXIT, "cannot increase directory list");
inpp = &inphead[inumber % dirhash];
@@ -657,8 +657,7 @@ allocino(ino_t request, int type)
{
ino_t ino;
union dinode *dp;
- struct bufarea *cgbp;
- struct cg *cgp;
+ struct cg *cgp = &cgrp;
int cg;
if (request == 0)
@@ -671,9 +670,8 @@ allocino(ino_t request, int type)
if (ino == maxino)
return (0);
cg = ino_to_cg(&sblock, ino);
- cgbp = cgget(cg);
- cgp = cgbp->b_un.b_cg;
- if (!check_cgmagic(cg, cgbp))
+ getblk(&cgblk, cgtod(&sblock, cg), sblock.fs_cgsize);
+ if (!check_cgmagic(cg, cgp))
return (0);
setbit(cg_inosused(cgp), ino % sblock.fs_ipg);
cgp->cg_cs.cs_nifree--;
@@ -689,7 +687,7 @@ allocino(ino_t request, int type)
default:
return (0);
}
- dirty(cgbp);
+ cgdirty();
dp = ginode(ino);
DIP_SET(dp, di_db[0], allocblk((long)1));
if (DIP(dp, di_db[0]) == 0) {
OpenPOWER on IntegriCloud