Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin Avoid common symbols for fsck_lfs.
details: https://anonhg.NetBSD.org/src/rev/20a616c1530e
branches: trunk
changeset: 1008799:20a616c1530e
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Apr 03 19:36:32 2020 +0000
description:
Avoid common symbols for fsck_lfs.
diffstat:
sbin/fsck/fsutil.c | 8 +++++---
sbin/fsck/fsutil.h | 6 ++++--
sbin/fsck_lfs/bufcache.c | 4 ++--
sbin/fsck_lfs/dir.c | 4 +---
sbin/fsck_lfs/extern.h | 26 ++++++++++++++++++++++++--
sbin/fsck_lfs/fsck.h | 6 +++---
sbin/fsck_lfs/fsck_vars.h | 4 ++--
sbin/fsck_lfs/inode.c | 3 +--
sbin/fsck_lfs/lfs.c | 12 ++----------
sbin/fsck_lfs/main.c | 4 ++--
sbin/fsck_lfs/pass0.c | 5 +----
sbin/fsck_lfs/pass1.c | 3 +--
sbin/fsck_lfs/pass2.c | 3 +--
sbin/fsck_lfs/pass4.c | 3 +--
sbin/fsck_lfs/pass5.c | 5 +----
sbin/fsck_lfs/pass6.c | 6 +-----
sbin/fsck_lfs/segwrite.c | 10 ++--------
sbin/fsck_lfs/setup.c | 6 +-----
sbin/fsck_lfs/utilities.c | 5 +----
sbin/fsck_lfs/vars.c | 7 ++++---
sbin/fsck_lfs/vnode.c | 4 ++--
21 files changed, 62 insertions(+), 72 deletions(-)
diffs (truncated from 549 to 300 lines):
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck/fsutil.c
--- a/sbin/fsck/fsutil.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck/fsutil.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsutil.c,v 1.26 2015/06/21 04:01:40 dholland Exp $ */
+/* $NetBSD: fsutil.c,v 1.27 2020/04/03 19:36:32 joerg Exp $ */
/*
* Copyright (c) 1990, 1993
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fsutil.c,v 1.26 2015/06/21 04:01:40 dholland Exp $");
+__RCSID("$NetBSD: fsutil.c,v 1.27 2020/04/03 19:36:32 joerg Exp $");
#endif /* not lint */
/*
@@ -66,10 +66,12 @@
volatile sig_atomic_t returntosingle;
+void (*ckfinish)(int);
+
static const char *dev = NULL;
static int hot = 0;
static int preen = 0;
-int quiet;
+int quiet; /* don't report clean filesystems */
#define F_ERROR 0x80000000
void
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck/fsutil.h
--- a/sbin/fsck/fsutil.h Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck/fsutil.h Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsutil.h,v 1.20 2015/06/21 03:58:36 dholland Exp $ */
+/* $NetBSD: fsutil.h,v 1.21 2020/04/03 19:36:32 joerg Exp $ */
/*
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -50,8 +50,10 @@
int checkfstab(int, int, void *(*)(struct fstab *),
int (*) (const char *, const char *, const char *, void *, pid_t *));
-void (*ckfinish)(int);
+extern void (*ckfinish)(int);
extern volatile sig_atomic_t returntosingle;
void catch(int) __dead;
void catchquit(int);
void voidquit(int);
+
+extern int quiet;
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/bufcache.c
--- a/sbin/fsck_lfs/bufcache.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/bufcache.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.20 2018/03/30 12:56:46 christos Exp $ */
+/* $NetBSD: bufcache.c,v 1.21 2020/04/03 19:36:33 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -44,7 +44,7 @@
#include <util.h>
#include "bufcache.h"
-#include "vnode.h"
+#include "extern.h"
/*
* Definitions for the buffer free lists.
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/dir.c
--- a/sbin/fsck_lfs/dir.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/dir.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.46 2015/09/21 01:24:23 dholland Exp $ */
+/* $NetBSD: dir.c,v 1.47 2020/04/03 19:36:33 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -45,7 +45,6 @@
#include <string.h>
#include "bufcache.h"
-#include "vnode.h"
#include "lfs_user.h"
#include "fsck.h"
@@ -53,7 +52,6 @@
#include "extern.h"
const char *lfname = "lost+found";
-int lfmode = 01700;
#if 0
struct lfs_dirtemplate emptydir = {
.dot_ino = 0,
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/extern.h
--- a/sbin/fsck_lfs/extern.h Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/extern.h Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.15 2015/10/03 08:29:06 dholland Exp $ */
+/* $NetBSD: extern.h,v 1.16 2020/04/03 19:36:33 joerg Exp $ */
/*
* Copyright (c) 1994 James A. Jegers
@@ -24,19 +24,29 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <stdarg.h>
+#include "vnode.h"
+
+struct inodesc;
+union lfs_dinode;
+struct inode;
+struct lfs;
+union lfs_dirheader;
+
void adjust(struct inodesc *, short);
int allocblk(long);
int allocdir(ino_t, ino_t, int);
void blkerror(ino_t, const char *, daddr_t);
void cacheino(union lfs_dinode *, ino_t);
int changeino(ino_t, const char *, ino_t);
+u_int32_t cksum(void *, size_t);
struct fstab;
void checkinode(ino_t, struct inodesc *);
int chkrange(daddr_t, int);
void ckfini(int);
int ckinode(union lfs_dinode *, struct inodesc *);
void clri(struct inodesc *, const char *, int);
-int dircheck(struct inodesc *, LFS_DIRHEADER *);
+int dircheck(struct inodesc *, union lfs_dirheader *);
void direrror(ino_t, const char *);
int dirscan(struct inodesc *);
int dofix(struct inodesc *, const char *);
@@ -51,6 +61,7 @@
void inocleanup(void);
void inodirty(struct inode *);
int linkup(ino_t, ino_t);
+ u_int32_t lfs_sb_cksum(struct lfs *);
int makeentry(ino_t, ino_t, const char *);
void pass0(void);
void pass1(void);
@@ -65,6 +76,17 @@
int pass6check(struct inodesc *);
void pinode(ino_t);
void propagate(void);
+void pwarn(const char *, ...);
int reply(const char *);
void resetinodebuf(void);
int setup(const char *);
+
+extern struct uvnodelst vnodelist;
+extern struct uvnodelst getvnodelist[VNODE_HASH_MAX];
+extern int nvnodes;
+extern void (*panic_func)(int, const char *, va_list);
+extern int fake_cleanseg;
+extern off_t locked_queue_bytes;
+extern int locked_queue_count;
+extern int preen;
+extern time_t write_time;
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/fsck.h
--- a/sbin/fsck_lfs/fsck.h Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/fsck.h Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.26 2015/10/03 08:30:13 dholland Exp $ */
+/* $NetBSD: fsck.h,v 1.27 2020/04/03 19:36:33 joerg Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
/*
* Inode cache data structures.
*/
-struct inoinfo {
+extern struct inoinfo {
struct inoinfo *i_nexthash; /* next entry in hash chain */
struct inoinfo *i_child, *i_sibling, *i_parentp;
ino_t i_number; /* inode number of this entry */
@@ -163,7 +163,7 @@
#define clrbmap(blkno) blockmap[blkno] = 0
#endif
-int Uflag; /* resolve user names */
+extern int Uflag; /* resolve user names */
#define STOP 0x01
#define SKIP 0x02
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/fsck_vars.h
--- a/sbin/fsck_lfs/fsck_vars.h Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/fsck_vars.h Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck_vars.h,v 1.15 2015/09/01 06:15:02 dholland Exp $ */
+/* $NetBSD: fsck_vars.h,v 1.16 2020/04/03 19:36:33 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -78,7 +78,7 @@
extern int no_roll_forward; /* Don't roll forward */
-blkcnt_t badblkcount; /* count of "bad" blocks */
+extern blkcnt_t badblkcount; /* count of "bad" blocks */
/* from setup.c */
extern SEGUSE *seg_table;
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/inode.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.69 2017/06/10 08:13:15 pgoyette Exp $ */
+/* $NetBSD: inode.c,v 1.70 2020/04/03 19:36:33 joerg Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -80,7 +80,6 @@
#include <util.h>
#include "bufcache.h"
-#include "vnode.h"
#include "lfs_user.h"
#include "fsck.h"
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/lfs.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.74 2018/06/12 20:12:21 zafer Exp $ */
+/* $NetBSD: lfs.c,v 1.75 2020/04/03 19:36:33 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -88,21 +88,13 @@
#include <util.h>
#include "bufcache.h"
-#include "vnode.h"
+#include "extern.h"
#include "lfs_user.h"
#include "segwrite.h"
#include "kernelops.h"
#define panic call_panic
-extern u_int32_t cksum(void *, size_t);
-extern u_int32_t lfs_sb_cksum(struct lfs *);
-extern void pwarn(const char *, ...);
-
-extern struct uvnodelst vnodelist;
-extern struct uvnodelst getvnodelist[VNODE_HASH_MAX];
-extern int nvnodes;
-
long dev_bsize = DEV_BSIZE;
static int
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/main.c
--- a/sbin/fsck_lfs/main.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/main.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.54 2019/08/15 03:10:43 kamil Exp $ */
+/* $NetBSD: main.c,v 1.55 2020/04/03 19:36:33 joerg Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -53,12 +53,12 @@
#include "fsutil.h"
#include "exitvalues.h"
+int Uflag;
static int argtoi(int, const char *, const char *, int);
static int checkfilesys(const char *, char *, long, int);
static void usage(void);
static void efun(int, const char *, ...);
-extern void (*panic_func)(int, const char *, va_list);
static void
efun(int eval, const char *fmt, ...)
diff -r fcc72e3b38dd -r 20a616c1530e sbin/fsck_lfs/pass0.c
--- a/sbin/fsck_lfs/pass0.c Fri Apr 03 19:09:43 2020 +0000
+++ b/sbin/fsck_lfs/pass0.c Fri Apr 03 19:36:32 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass0.c,v 1.42 2015/09/01 06:11:06 dholland Exp $ */
+/* $NetBSD: pass0.c,v 1.43 2020/04/03 19:36:33 joerg Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -77,15 +77,12 @@
#include <util.h>
#include "bufcache.h"
-#include "vnode.h"
#include "lfs_user.h"
#include "fsck.h"
#include "extern.h"
#include "fsutil.h"
-extern int fake_cleanseg;
Home |
Main Index |
Thread Index |
Old Index