From 58a7a2ddeba0c89ba89db730cfad33aeb85c81d6 Mon Sep 17 00:00:00 2001 From: Tom Cosgrove Date: Sat, 21 Feb 2004 00:29:58 +0000 Subject: Tidy up installboot -v output. requested by and ok deraadt@ --- sys/arch/i386/stand/installboot/installboot.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'sys/arch/i386/stand') diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c index 5585eeb1bbb..0ffefbfbe3d 100644 --- a/sys/arch/i386/stand/installboot/installboot.c +++ b/sys/arch/i386/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.43 2004/01/26 23:21:49 tom Exp $ */ +/* $OpenBSD: installboot.c,v 1.44 2004/02/21 00:29:57 tom Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -419,9 +419,6 @@ getbootparams(char *boot, int devfd, struct disklabel *dl) ndb = howmany(ip->di_size, fs->fs_bsize); if (ndb <= 0) errx(1, "No blocks to load"); - if (verbose) - fprintf(stderr, "%s is %d blocks x %d bytes\n", - boot, ndb, fs->fs_bsize); /* * Now set the values that will need to go into biosboot @@ -438,6 +435,16 @@ getbootparams(char *boot, int devfd, struct disklabel *dl) ((((char *)ap) - buf) + INODEOFF)); sym_set_value(pbr_symbols, "_nblocks", ndb); + if (verbose) { + fprintf(stderr, "%s is %d blocks x %d bytes\n", + boot, ndb, fs->fs_bsize); + fprintf(stderr, "fs block shift %u; part offset %u; " + "inode block %u, offset %u\n", + fs->fs_fsbtodb, pl->p_offset, + ino_to_fsba(fs, statbuf.st_ino), + ((((char *)ap) - buf) + INODEOFF)); + } + return 0; } @@ -524,8 +531,10 @@ pbr_set_symbols(char *fname, char *proto, struct sym_data *sym_list) free(nl); +#if 0 if (verbose) fprintf(stderr, "%s = %u\n", sym->sym_name, sym->sym_value); +#endif } } -- cgit v1.2.3