Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/fsck_lfs Revert previous; it doesn't work because all t...
details: https://anonhg.NetBSD.org/src/rev/4e47c349f833
branches: trunk
changeset: 330524:4e47c349f833
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jul 13 02:44:21 2014 +0000
description:
Revert previous; it doesn't work because all the lfs tools
promiscuously .PATH in each other's source files, and I haven't the
time or patience to deal with it tonight.
diffstat:
sbin/fsck_lfs/lfs.c | 13 ++++++++++---
sbin/fsck_lfs/lfs_user.h | 3 ++-
sbin/fsck_lfs/main.c | 4 +++-
3 files changed, 15 insertions(+), 5 deletions(-)
diffs (88 lines):
diff -r e6e7f4a8eaf6 -r 4e47c349f833 sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c Sun Jul 13 01:58:08 2014 +0000
+++ b/sbin/fsck_lfs/lfs.c Sun Jul 13 02:44:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.42 2014/07/12 19:44:00 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.43 2014/07/13 02:44:21 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -85,7 +85,6 @@
#include <unistd.h>
#include <util.h>
-#include "fsutil.h"
#include "bufcache.h"
#include "vnode.h"
#include "lfs_user.h"
@@ -108,6 +107,7 @@
lfs_fragextend(struct uvnode *, int, int, daddr_t, struct ubuf **);
int fsdirty = 0;
+void (*panic_func)(int, const char *, va_list) = my_vpanic;
/*
* LFS buffer and uvnode operations
@@ -835,12 +835,19 @@
/* print message and exit */
void
+my_vpanic(int fatal, const char *fmt, va_list ap)
+{
+ (void) vprintf(fmt, ap);
+ exit(8);
+}
+
+void
call_panic(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- vmsg(1, fmt, ap);
+ panic_func(1, fmt, ap);
va_end(ap);
}
diff -r e6e7f4a8eaf6 -r 4e47c349f833 sbin/fsck_lfs/lfs_user.h
--- a/sbin/fsck_lfs/lfs_user.h Sun Jul 13 01:58:08 2014 +0000
+++ b/sbin/fsck_lfs/lfs_user.h Sun Jul 13 02:44:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_user.h,v 1.6 2014/07/12 19:48:24 dholland Exp $ */
+/* $NetBSD: lfs_user.h,v 1.7 2014/07/13 02:44:21 dholland Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -89,6 +89,7 @@
ulfs_daddr_t try_verify(struct lfs *, struct uvnode *, ulfs_daddr_t, int);
struct ulfs1_dinode *lfs_ifind(struct lfs *, ino_t, struct ubuf *);
void call_panic(const char *, ...);
+void my_vpanic(int, const char *, va_list);
int extend_ifile(struct lfs *);
struct uvnode *lfs_valloc(struct lfs *, ino_t);
int lfs_balloc(struct uvnode *, off_t, int, struct ubuf **);
diff -r e6e7f4a8eaf6 -r 4e47c349f833 sbin/fsck_lfs/main.c
--- a/sbin/fsck_lfs/main.c Sun Jul 13 01:58:08 2014 +0000
+++ b/sbin/fsck_lfs/main.c Sun Jul 13 02:44:21 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.47 2014/07/12 19:44:00 dholland Exp $ */
+/* $NetBSD: main.c,v 1.48 2014/07/13 02:44:21 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -57,6 +57,7 @@
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, ...)
@@ -80,6 +81,7 @@
skipclean = 1;
exitonfail = 0;
idaddr = 0x0;
+ panic_func = vmsg;
esetfunc(efun);
while ((ch = getopt(argc, argv, optstring)) != -1) {
switch (ch) {
Home |
Main Index |
Thread Index |
Old Index