CVS commit: src/sbin/fsdb

2021-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 29 16:51:25 UTC 2021

Modified Files:
src/sbin/fsdb: fsdb.8 fsdb.c fsdbutil.c

Log Message:
Add birthtime support and make time 64 bit.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/fsdb/fsdb.8
cvs rdiff -u -r1.51 -r1.52 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdbutil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/fsdb.8
diff -u src/sbin/fsdb/fsdb.8:1.26 src/sbin/fsdb/fsdb.8:1.27
--- src/sbin/fsdb/fsdb.8:1.26	Sat Aug  5 16:25:41 2017
+++ src/sbin/fsdb/fsdb.8	Sat May 29 12:51:25 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fsdb.8,v 1.26 2017/08/05 20:25:41 wiz Exp $
+.\"	$NetBSD: fsdb.8,v 1.27 2021/05/29 16:51:25 christos Exp $
 .\"
 .\" Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 3, 2017
+.Dd May 29, 2021
 .Dt FSDB 8
 .Os
 .Sh NAME
@@ -207,7 +207,8 @@ Change the generation number of the curr
 .It Cm mtime Ar time
 .It Cm ctime Ar time
 .It Cm atime Ar time
-Change the modification, change, or access time (respectively) on the
+.It Cm birthtime Ar time
+Change the modification, change, access time, or birthtime (respectively) on the
 current inode to
 .Ar time .
 .Ar Time
@@ -219,9 +220,11 @@ is an optional nanosecond specification.
 If no nanoseconds are specified, the
 .Va mtimensec ,
 .Va ctimensec ,
+.Va atimensec ,
 or
-.Va atimensec
+.Va birthtimensec
 field will be set to zero.
+The birthtime field is only available on ufs2 filesystems.
 .Pp
 .It Cm quit , Cm q , Cm exit , Aq Em EOF
 Exit the program.

Index: src/sbin/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.51 src/sbin/fsdb/fsdb.c:1.52
--- src/sbin/fsdb/fsdb.c:1.51	Sun Apr  5 11:25:40 2020
+++ src/sbin/fsdb/fsdb.c	Sat May 29 12:51:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.52 2021/05/29 16:51:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.52 2021/05/29 16:51:25 christos Exp $");
 #endif /* not lint */
 
 #include 
@@ -137,7 +137,7 @@ static int scannames(struct inodesc *);
 static int dolookup(char *);
 static int chinumfunc(struct inodesc *);
 static int chnamefunc(struct inodesc *);
-static int dotime(char *, int32_t *, int32_t *);
+static int dotime(char *, int64_t *, int32_t *);
 static void print_blks32(int32_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp);
 static void print_blks64(int64_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp);
 static void print_indirblks32(uint32_t blk, int ind_level,
@@ -242,6 +242,7 @@ CMDFUNC(back);			/* pop back to last ino
 CMDFUNC(chmtime);		/* Change mtime */
 CMDFUNC(chctime);		/* Change ctime */
 CMDFUNC(chatime);		/* Change atime */
+CMDFUNC(chbirthtime);		/* Change birthtime */
 CMDFUNC(chinum);		/* Change inode # of dirent */
 CMDFUNC(chname);		/* Change dirname of dirent */
 
@@ -278,6 +279,8 @@ static struct cmdtable cmds[] = {
 	{"mtime", "Change mtime of current inode to MTIME", 2, 2, chmtime},
 	{"ctime", "Change ctime of current inode to CTIME", 2, 2, chctime},
 	{"atime", "Change atime of current inode to ATIME", 2, 2, chatime},
+	{"birthtime", "Change atime of current inode to BIRTHTIME", 2, 2,
+	chbirthtime},
 	{"quit", "Exit", 1, 1, quit},
 	{"q", "Exit", 1, 1, quit},
 	{"exit", "Exit", 1, 1, quit},
@@ -1357,11 +1360,11 @@ CMDFUNC(chgroup)
 }
 
 static int
-dotime(char *name, int32_t *rsec, int32_t *rnsec)
+dotime(char *name, int64_t *rsec, int32_t *rnsec)
 {
 	char   *p, *val;
 	struct tm t;
-	int32_t sec;
+	int64_t sec;
 	int32_t nsec;
 	p = strchr(name, '.');
 	if (p) {
@@ -1405,14 +1408,15 @@ badformat:
 		warnx("date/time out of range");
 		return 1;
 	}
-	*rsec = iswap32(sec);
+	*rsec = iswap64(sec);
 	*rnsec = iswap32(nsec);
 	return 0;
 }
 
 CMDFUNC(chmtime)
 {
-	int32_t rsec, nsec;
+	int64_t rsec;
+	int32_t nsec;
 
 	if (dotime(argv[1], , ))
 		return 1;
@@ -1425,7 +1429,8 @@ CMDFUNC(chmtime)
 
 CMDFUNC(chatime)
 {
-	int32_t rsec, nsec;
+	int64_t rsec;
+	int32_t nsec;
 
 	if (dotime(argv[1], , ))
 		return 1;
@@ -1438,7 +1443,8 @@ CMDFUNC(chatime)
 
 CMDFUNC(chctime)
 {
-	int32_t rsec, nsec;
+	int64_t rsec;
+	int32_t nsec;
 
 	if (dotime(argv[1], , ))
 		return 1;
@@ -1448,3 +1454,22 @@ CMDFUNC(chctime)
 	printactive();
 	return 0;
 }
+
+CMDFUNC(chbirthtime)
+{
+	int64_t rsec;
+	int32_t nsec;
+
+	if (!is_ufs2) {
+		warnx("birthtime can only be set in ufs2");
+		return 1;
+	}
+
+	if (dotime(argv[1], , ))
+		return 1;
+	curinode->dp2.di_birthtime = rsec;
+	curinode->dp2.di_birthnsec = nsec;
+	inodirty();
+	printactive();
+	

CVS commit: src/sbin/fsdb

2021-05-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 29 16:51:25 UTC 2021

Modified Files:
src/sbin/fsdb: fsdb.8 fsdb.c fsdbutil.c

Log Message:
Add birthtime support and make time 64 bit.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/fsdb/fsdb.8
cvs rdiff -u -r1.51 -r1.52 src/sbin/fsdb/fsdb.c
cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdbutil.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2021-04-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 15 01:56:00 UTC 2021

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
vax vs gcc:  fsdb.c loses.  also build this with -O0.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.40 src/sbin/fsdb/Makefile:1.41
--- src/sbin/fsdb/Makefile:1.40	Sun Sep  6 07:20:27 2020
+++ src/sbin/fsdb/Makefile	Thu Apr 15 01:56:00 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.40 2020/09/06 07:20:27 mrg Exp $
+#	$NetBSD: Makefile,v 1.41 2021/04/15 01:56:00 mrg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include 
@@ -42,6 +42,7 @@ COPTS.pass1.c+=	-fno-tree-fre -fno-tree-
 .if ${MACHINE_ARCH} == "vax"
 COPTS.pass1.c+=	-O0
 COPTS.inode.c+=	-O0
+COPTS.fsdb.c+=	-O0
 .endif
 
 CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}



CVS commit: src/sbin/fsdb

2021-04-14 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Apr 15 01:56:00 UTC 2021

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
vax vs gcc:  fsdb.c loses.  also build this with -O0.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2017-08-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug  5 20:25:41 UTC 2017

Modified Files:
src/sbin/fsdb: fsdb.8

Log Message:
Fix punctuation markup.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/fsdb/fsdb.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/fsdb.8
diff -u src/sbin/fsdb/fsdb.8:1.25 src/sbin/fsdb/fsdb.8:1.26
--- src/sbin/fsdb/fsdb.8:1.25	Fri Aug  4 07:19:35 2017
+++ src/sbin/fsdb/fsdb.8	Sat Aug  5 20:25:41 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fsdb.8,v 1.25 2017/08/04 07:19:35 mrg Exp $
+.\"	$NetBSD: fsdb.8,v 1.26 2017/08/05 20:25:41 wiz Exp $
 .\"
 .\" Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -223,7 +223,7 @@ or
 .Va atimensec
 field will be set to zero.
 .Pp
-.It Cm quit, Cm q, Cm exit, Aq Em EOF
+.It Cm quit , Cm q , Cm exit , Aq Em EOF
 Exit the program.
 .El
 .Sh SEE ALSO



CVS commit: src/sbin/fsdb

2017-08-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Aug  5 20:25:41 UTC 2017

Modified Files:
src/sbin/fsdb: fsdb.8

Log Message:
Fix punctuation markup.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/fsdb/fsdb.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2017-08-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Aug  4 07:19:35 UTC 2017

Modified Files:
src/sbin/fsdb: fsdb.8 fsdb.c

Log Message:
add a "saveblks " command that saves the data blocks of the current
inode into named file.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sbin/fsdb/fsdb.8
cvs rdiff -u -r1.49 -r1.50 src/sbin/fsdb/fsdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2017-08-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Aug  4 07:19:35 UTC 2017

Modified Files:
src/sbin/fsdb: fsdb.8 fsdb.c

Log Message:
add a "saveblks " command that saves the data blocks of the current
inode into named file.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sbin/fsdb/fsdb.8
cvs rdiff -u -r1.49 -r1.50 src/sbin/fsdb/fsdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/fsdb.8
diff -u src/sbin/fsdb/fsdb.8:1.24 src/sbin/fsdb/fsdb.8:1.25
--- src/sbin/fsdb/fsdb.8:1.24	Mon Jul  3 21:33:41 2017
+++ src/sbin/fsdb/fsdb.8	Fri Aug  4 07:19:35 2017
@@ -1,6 +1,6 @@
-.\"	$NetBSD: fsdb.8,v 1.24 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: fsdb.8,v 1.25 2017/08/04 07:19:35 mrg Exp $
 .\"
-.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 3, 2004
+.Dd August 3, 2017
 .Dt FSDB 8
 .Os
 .Sh NAME
@@ -136,6 +136,10 @@ Find the inode(s) owning the specified d
 Note that these are not absolute disk blocks numbers, but offsets from the
 start of the partition.
 .Pp
+.It Cm saveblks Ar filename
+Save the current inode's data into
+.Ar filename .
+.Pp
 .It Cm rm Ar name
 .It Cm del Ar name
 Remove the entry

Index: src/sbin/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.49 src/sbin/fsdb/fsdb.c:1.50
--- src/sbin/fsdb/fsdb.c:1.49	Thu Jul 28 08:24:58 2016
+++ src/sbin/fsdb/fsdb.c	Fri Aug  4 07:19:35 2017
@@ -1,7 +1,7 @@
-/*	$NetBSD: fsdb.c,v 1.49 2016/07/28 08:24:58 martin Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.50 2017/08/04 07:19:35 mrg Exp $	*/
 
 /*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996, 2017 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fsdb.c,v 1.49 2016/07/28 08:24:58 martin Exp $");
+__RCSID("$NetBSD: fsdb.c,v 1.50 2017/08/04 07:19:35 mrg Exp $");
 #endif /* not lint */
 
 #include 
@@ -61,6 +61,13 @@ __RCSID("$NetBSD: fsdb.c,v 1.49 2016/07/
 #include "fsck.h"
 #include "extern.h"
 
+/* Used to keep state for "saveblks" command.  */
+struct wrinfo {
+	off_t size;
+	off_t written_size;
+	int fd;
+};
+
 __dead static void usage(void);
 static int cmdloop(void);
 static char *prompt(EditLine *);
@@ -69,12 +76,12 @@ static int dolookup(char *);
 static int chinumfunc(struct inodesc *);
 static int chnamefunc(struct inodesc *);
 static int dotime(char *, int32_t *, int32_t *);
-static void print_blks32(int32_t *buf, int size, uint64_t *blknum);
-static void print_blks64(int64_t *buf, int size, uint64_t *blknum);
+static void print_blks32(int32_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp);
+static void print_blks64(int64_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp);
 static void print_indirblks32(uint32_t blk, int ind_level,
-uint64_t *blknum);
+uint64_t *blknum, struct wrinfo *wrp);
 static void print_indirblks64(uint64_t blk, int ind_level,
-uint64_t *blknum);
+uint64_t *blknum, struct wrinfo *wrp);
 static int compare_blk32(uint32_t *, uint32_t);
 static int compare_blk64(uint64_t *, uint64_t);
 static int founddatablk(uint64_t);
@@ -191,6 +198,7 @@ static struct cmdtable cmds[] = {
 	{"linkcount", "Set link count to COUNT", 2, 2, linkcount},
 	{"ls", "List current inode as directory", 1, 1, ls},
 	{"blks", "List current inode's data blocks", 1, 1, blks},
+	{"saveblks", "Save current inode's data blocks", 2, 2, blks},
 	{"findblk", "Find inode owning disk block(s)", 2, 33, findblk},
 	{"rm", "Remove NAME from current inode directory", 2, 2, rm},
 	{"del", "Remove NAME from current inode directory", 2, 2, rm},
@@ -452,6 +460,18 @@ CMDFUNC(blks)
 {
 	uint64_t blkno = 0;
 	int i, type;
+	struct wrinfo wrinfo, *wrp = NULL;
+
+	if (strcmp(argv[0], "saveblks") == 0) {
+		wrinfo.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0644);
+		if (wrinfo.fd == -1) {
+			warn("unable to create file %s", argv[1]);
+			return 0;
+		}
+		wrinfo.size = DIP(curinode, size);
+		wrinfo.written_size = 0;
+		wrp = 
+	}
 	if (!curinode) {
 		warnx("no current inode");
 		return 0;
@@ -471,18 +491,18 @@ CMDFUNC(blks)
 	}
 	printf("Direct blocks:\n");
 	if (is_ufs2)
-		print_blks64(curinode->dp2.di_db, UFS_NDADDR, );
+		print_blks64(curinode->dp2.di_db, UFS_NDADDR, , wrp);
 	else
-		print_blks32(curinode->dp1.di_db, UFS_NDADDR, );
+		print_blks32(curinode->dp1.di_db, UFS_NDADDR, , wrp);
 
 	if (is_ufs2) {
 		for (i = 0; i < UFS_NIADDR; i++)
 			print_indirblks64(iswap64(curinode->dp2.di_ib[i]), i,
-			);
+			, wrp);
 	} else {
 		for (i = 0; i < UFS_NIADDR; i++)
 			

CVS commit: src/sbin/fsdb

2014-03-03 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Mon Mar  3 12:12:19 UTC 2014

Modified Files:
src/sbin/fsdb: fsdb.8

Log Message:
Correct usage of clri.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdb.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/fsdb.8
diff -u src/sbin/fsdb/fsdb.8:1.22 src/sbin/fsdb/fsdb.8:1.23
--- src/sbin/fsdb/fsdb.8:1.22	Wed Apr 30 13:10:53 2008
+++ src/sbin/fsdb/fsdb.8	Mon Mar  3 12:12:18 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: fsdb.8,v 1.22 2008/04/30 13:10:53 martin Exp $
+.\	$NetBSD: fsdb.8,v 1.23 2014/03/03 12:12:18 blymn Exp $
 .\
 .\ Copyright (c) 1996 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -93,8 +93,9 @@ as the new current inode.
 .It Cm back
 Revert to the previously current inode.
 .Pp
-.It Cm clri
-Clear the current inode.
+.It Cm clri Ar i-number
+Clear the inode
+.Ar i-number .
 .Pp
 .It Cm lookup Ar name
 .It Cm cd Ar name



CVS commit: src/sbin/fsdb

2014-03-03 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Mon Mar  3 12:12:19 UTC 2014

Modified Files:
src/sbin/fsdb: fsdb.8

Log Message:
Correct usage of clri.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdb.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2013-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  9 16:01:58 UTC 2013

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
put instruction generation bug for the vax for 4.8 too


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.34 src/sbin/fsdb/Makefile:1.35
--- src/sbin/fsdb/Makefile:1.34	Fri Aug 10 08:20:11 2012
+++ src/sbin/fsdb/Makefile	Sat Nov  9 11:01:58 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2012/08/10 12:20:11 joerg Exp $
+#	$NetBSD: Makefile,v 1.35 2013/11/09 16:01:58 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 .include bsd.own.mk
@@ -42,6 +42,6 @@ COPTS.pass1.c+=	-fno-tree-fre -fno-tree-
 .include bsd.prog.mk
 
 # XXX
-.if defined(HAVE_GCC)  ${HAVE_GCC} == 45  ${MACHINE_ARCH} == vax
+.if defined(HAVE_GCC)  ${HAVE_GCC} = 45  ${MACHINE_ARCH} == vax
 COPTS.fsdb.c+=	-O0
 .endif



CVS commit: src/sbin/fsdb

2013-11-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  9 16:01:58 UTC 2013

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
put instruction generation bug for the vax for 4.8 too


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2011-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 14 12:30:04 UTC 2011

Modified Files:
src/sbin/fsdb: Makefile fsdb.c

Log Message:
remove gcc-4.5 hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sbin/fsdb/Makefile
cvs rdiff -u -r1.41 -r1.42 src/sbin/fsdb/fsdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.31 src/sbin/fsdb/Makefile:1.32
--- src/sbin/fsdb/Makefile:1.31	Sun Jul  3 11:29:35 2011
+++ src/sbin/fsdb/Makefile	Sun Aug 14 08:30:04 2011
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.31 2011/07/03 15:29:35 mrg Exp $
+#	$NetBSD: Makefile,v 1.32 2011/08/14 12:30:04 christos Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
-WARNS?=	3	# XXX: sign-compare issues in ../fsck_ffs
+WARNS?=	4
 
 .include bsd.own.mk
 
@@ -46,9 +46,6 @@
 .include bsd.prog.mk
 
 # XXX
-.if defined(HAVE_GCC)  ${HAVE_GCC} == 45
-COPTS.fsdb.c+=	-Wno-error
-.if ${MACHINE_ARCH} == vax
+.if defined(HAVE_GCC)  ${HAVE_GCC} == 45  ${MACHINE_ARCH} == vax
 COPTS.fsdb.c+=	-O0
 .endif
-.endif

Index: src/sbin/fsdb/fsdb.c
diff -u src/sbin/fsdb/fsdb.c:1.41 src/sbin/fsdb/fsdb.c:1.42
--- src/sbin/fsdb/fsdb.c:1.41	Thu Jun  9 17:23:30 2011
+++ src/sbin/fsdb/fsdb.c	Sun Aug 14 08:30:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fsdb.c,v 1.41 2011/06/09 21:23:30 christos Exp $	*/
+/*	$NetBSD: fsdb.c,v 1.42 2011/08/14 12:30:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: fsdb.c,v 1.41 2011/06/09 21:23:30 christos Exp $);
+__RCSID($NetBSD: fsdb.c,v 1.42 2011/08/14 12:30:04 christos Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -280,8 +280,7 @@
 		 * el_parse returns -1 to signal that it's not been
 		 * handled internally.
 		 */
-			if (el_parse(elptr, cmd_argc,
- (const char **)cmd_argv) != -1)
+			if (el_parse(elptr, cmd_argc, (void *)cmd_argv) != -1)
 continue;
 			known = 0;
 			for (cmdp = cmds; cmdp-cmd; cmdp++) {



CVS commit: src/sbin/fsdb

2011-08-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Aug 15 00:16:58 UTC 2011

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
Remove redundant WARNS=4


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.32 src/sbin/fsdb/Makefile:1.33
--- src/sbin/fsdb/Makefile:1.32	Sun Aug 14 12:30:04 2011
+++ src/sbin/fsdb/Makefile	Mon Aug 15 00:16:58 2011
@@ -1,8 +1,6 @@
-#	$NetBSD: Makefile,v 1.32 2011/08/14 12:30:04 christos Exp $
+#	$NetBSD: Makefile,v 1.33 2011/08/15 00:16:58 dholland Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
-WARNS?=	4
-
 .include bsd.own.mk
 
 PROG=	fsdb



CVS commit: src/sbin/fsdb

2011-08-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 14 12:30:04 UTC 2011

Modified Files:
src/sbin/fsdb: Makefile fsdb.c

Log Message:
remove gcc-4.5 hacks.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sbin/fsdb/Makefile
cvs rdiff -u -r1.41 -r1.42 src/sbin/fsdb/fsdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2011-08-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Aug 15 00:16:58 UTC 2011

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
Remove redundant WARNS=4


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/fsdb

2009-06-06 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Sat Jun  6 08:22:24 UTC 2009

Modified Files:
src/sbin/fsdb: Makefile

Log Message:
Add proplib to list of libraries, ifx fsdb build after my getdiskinfo change.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/fsdb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsdb/Makefile
diff -u src/sbin/fsdb/Makefile:1.25 src/sbin/fsdb/Makefile:1.26
--- src/sbin/fsdb/Makefile:1.25	Sat Apr 11 07:58:12 2009
+++ src/sbin/fsdb/Makefile	Sat Jun  6 08:22:24 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.25 2009/04/11 07:58:12 lukem Exp $
+#	$NetBSD: Makefile,v 1.26 2009/06/06 08:22:24 haad Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 WARNS?=	3	# XXX: sign-compare issues in ../fsck_ffs
@@ -22,9 +22,9 @@
 .PATH:	${NETBSDSRCDIR}/sys/kern
 CPPFLAGS+=-DWAPBL_DEBUG_PRINT=0
 
-LDADD+= -lutil -ledit -ltermcap
+LDADD+= -lutil -ledit -ltermcap -lprop
 .ifndef HOSTPROG
-DPADD+= ${LIBUTIL} ${LIBEDIT} ${LIBTERMCAP}
+DPADD+= ${LIBUTIL} ${LIBEDIT} ${LIBTERMCAP} ${LIBPROP}
 .endif
 
 .if (defined(HAVE_GCC)  ${HAVE_GCC} == 4) || defined(HAVE_PCC)