summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/fsck.h
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/fsck.h
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/fsck.h')
-rw-r--r--sbin/fsck_ffs/fsck.h37
1 files changed, 4 insertions, 33 deletions
diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h
index 7b45d48..ef98fa2 100644
--- a/sbin/fsck_ffs/fsck.h
+++ b/sbin/fsck_ffs/fsck.h
@@ -198,6 +198,7 @@ struct timespec totalreadtime[BT_NUMBUFTYPES];
struct timespec startprog;
struct bufarea sblk; /* file system superblock */
+struct bufarea cgblk; /* cylinder group blocks */
struct bufarea *pdirbp; /* current directory contents */
struct bufarea *pbp; /* current inode block */
@@ -215,7 +216,9 @@ struct bufarea *pbp; /* current inode block */
} while (0)
#define sbdirty() dirty(&sblk)
+#define cgdirty() dirty(&cgblk)
#define sblock (*sblk.b_un.b_fs)
+#define cgrp (*cgblk.b_un.b_cg)
enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE};
ino_t cursnapshot;
@@ -358,37 +361,6 @@ struct ufs2_dinode ufs2_zino;
#define EEXIT 8 /* Standard error exit. */
-int flushentry(void);
-/*
- * Wrapper for malloc() that flushes the cylinder group cache to try
- * to get space.
- */
-static inline void*
-Malloc(int size)
-{
- void *retval;
-
- while ((retval = malloc(size)) == NULL)
- if (flushentry() == 0)
- break;
- return (retval);
-}
-
-/*
- * Wrapper for calloc() that flushes the cylinder group cache to try
- * to get space.
- */
-static inline void*
-Calloc(int cnt, int size)
-{
- void *retval;
-
- while ((retval = calloc(cnt, size)) == NULL)
- if (flushentry() == 0)
- break;
- return (retval);
-}
-
struct fstab;
@@ -406,7 +378,7 @@ void cacheino(union dinode *dp, ino_t inumber);
void catch(int);
void catchquit(int);
int changeino(ino_t dir, const char *name, ino_t newnum);
-int check_cgmagic(int cg, struct bufarea *cgbp);
+int check_cgmagic(int cg, struct cg *cgp);
int chkrange(ufs2_daddr_t blk, int cnt);
void ckfini(int markclean);
int ckinode(union dinode *dp, struct inodesc *);
@@ -426,7 +398,6 @@ void freeino(ino_t ino);
void freeinodebuf(void);
int ftypeok(union dinode *dp);
void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size);
-struct bufarea *cgget(int cg);
struct bufarea *getdatablk(ufs2_daddr_t blkno, long size, int type);
struct inoinfo *getinoinfo(ino_t inumber);
union dinode *getnextinode(ino_t inumber, int rebuildcg);
OpenPOWER on IntegriCloud