From owner-cvs-sbin Sun Jan 21 15:55:53 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA16128 for cvs-sbin-outgoing; Sun, 21 Jan 1996 15:55:53 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA16121 Sun, 21 Jan 1996 15:55:51 -0800 (PST) Date: Sun, 21 Jan 1996 15:55:51 -0800 (PST) From: Joerg Wunsch Message-Id: <199601212355.PAA16121@freefall.freebsd.org> To: CVS-committers, cvs-sbin Subject: cvs commit: src/sbin/disklabel disklabel.c Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk joerg 96/01/21 15:55:51 Modified: sbin/disklabel disklabel.c Log: Declare functions, resolve printf-format warnings. Revision Changes Path 1.6 +75 -33 src/sbin/disklabel/disklabel.c From owner-cvs-sbin Sun Jan 21 17:01:19 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA22063 for cvs-sbin-outgoing; Sun, 21 Jan 1996 17:01:19 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA22056 Sun, 21 Jan 1996 17:01:17 -0800 (PST) Date: Sun, 21 Jan 1996 17:01:17 -0800 (PST) From: Joerg Wunsch Message-Id: <199601220101.RAA22056@freefall.freebsd.org> To: CVS-committers, cvs-sbin Subject: cvs commit: src/sbin/disklabel disklabel.8 disklabel.c Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk joerg 96/01/21 17:01:17 Modified: sbin/disklabel disklabel.8 disklabel.c Log: Finally implement the "auto" disktype. It attempts to get all the required information from the driver, and produce a virgin disklabel for it. The latter might be further edited with `disklabel -e' to satisfy the user's need. The magic sequence is: disklabel -r -w sdX auto disklabel -e sdX Revision Changes Path 1.2 +21 -0 src/sbin/disklabel/disklabel.8 1.7 +47 -1 src/sbin/disklabel/disklabel.c From owner-cvs-sbin Sun Jan 21 19:09:58 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA01451 for cvs-sbin-outgoing; Sun, 21 Jan 1996 19:09:58 -0800 (PST) Received: from asguard.bga.com (asguard.bga.com [198.3.117.20]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id TAA01432 Sun, 21 Jan 1996 19:09:50 -0800 (PST) Received: (from faulkner@localhost) by asguard.bga.com (8.7.3/8.7.3) id VAA13220; Sun, 21 Jan 1996 21:09:31 -0600 (CST) From: Boyd Faulkner Message-Id: <199601220309.VAA13220@asguard.bga.com> Subject: Re: cvs commit: src/sbin/disklabel disklabel.8 disklabel.c To: joerg@freefall.freebsd.org (Joerg Wunsch) Date: Sun, 21 Jan 1996 21:09:30 -0559 (CST) Cc: CVS-committers@freefall.freebsd.org, cvs-sbin@freefall.freebsd.org In-Reply-To: <199601220101.RAA22056@freefall.freebsd.org> from "Joerg Wunsch" at Jan 21, 96 05:01:00 pm X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk According to Joerg Wunsch: > > joerg 96/01/21 17:01:17 > > Modified: sbin/disklabel disklabel.8 disklabel.c > Log: > Finally implement the "auto" disktype. It attempts to get all the > required information from the driver, and produce a virgin disklabel > for it. The latter might be further edited with `disklabel -e' to > satisfy the user's need. > > The magic sequence is: > > disklabel -r -w sdX auto > disklabel -e sdX > > Revision Changes Path > 1.2 +21 -0 src/sbin/disklabel/disklabel.8 > 1.7 +47 -1 src/sbin/disklabel/disklabel.c > > Thank you. Oh God, yes, thank you. Boyd -- _____________________________________________________________________________ Boyd Faulkner "The fates lead him who will; faulkner@isd.tandem.com Him who won't, they drag." http://cactus.org/~faulkner Old Roman Saying -- Source: Joseph Campbell _____________________________________________________________________________ From owner-cvs-sbin Mon Jan 22 04:55:19 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA08674 for cvs-sbin-outgoing; Mon, 22 Jan 1996 04:55:19 -0800 (PST) Received: (from mpp@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA08667 Mon, 22 Jan 1996 04:55:17 -0800 (PST) Date: Mon, 22 Jan 1996 04:55:17 -0800 (PST) From: Mike Pritchard Message-Id: <199601221255.EAA08667@freefall.freebsd.org> To: CVS-committers, cvs-sbin Subject: cvs commit: src/sbin/newfs newfs.8 Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk mpp 96/01/22 04:55:17 Modified: sbin/newfs newfs.8 Log: Change the reference to format(8) (which we don't have) to fdformat(1) and scsiformat(8) (which we do have). Closes PR# 663. Revision Changes Path 1.6 +2 -1 src/sbin/newfs/newfs.8 From owner-cvs-sbin Mon Jan 22 15:31:25 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA27958 for cvs-sbin-outgoing; Mon, 22 Jan 1996 15:31:25 -0800 (PST) Received: (from pst@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA27951 Mon, 22 Jan 1996 15:31:22 -0800 (PST) Date: Mon, 22 Jan 1996 15:31:22 -0800 (PST) From: Paul Traina Message-Id: <199601222331.PAA27951@freefall.freebsd.org> To: CVS-committers, cvs-sbin Subject: cvs commit: src/sbin/rdisc rdisc.8 DISCLAIMER Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk pst 96/01/22 15:31:22 Modified: sbin/rdisc rdisc.8 Removed: sbin/rdisc DISCLAIMER Log: Disclaimer redundant and man page cleanups Revision Changes Path 1.2 +20 -21 src/sbin/rdisc/rdisc.8 From owner-cvs-sbin Thu Jan 25 15:44:36 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA18200 for cvs-sbin-outgoing; Thu, 25 Jan 1996 15:44:36 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA18190 Thu, 25 Jan 1996 15:44:34 -0800 (PST) Date: Thu, 25 Jan 1996 15:44:34 -0800 (PST) From: Joerg Wunsch Message-Id: <199601252344.PAA18190@freefall.freebsd.org> To: CVS-committers, cvs-sbin Subject: cvs commit: src/sbin/newfs mkfs.c Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk joerg 96/01/25 15:44:34 Modified: sbin/newfs mkfs.c Log: Make the numbers for the "superblock backups" fit nicely on the screen, even for larger partitions. Until now, partition sizes > 500 MB messed up the screen. Revision Changes Path 1.9 +35 -1 src/sbin/newfs/mkfs.c From owner-cvs-sbin Fri Jan 26 02:43:28 1996 Return-Path: owner-cvs-sbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA29478 for cvs-sbin-outgoing; Fri, 26 Jan 1996 02:43:28 -0800 (PST) Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id CAA29465 Fri, 26 Jan 1996 02:43:08 -0800 (PST) Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.7.3/8.6.9) id CAA01515; Fri, 26 Jan 1996 02:43:06 -0800 (PST) Date: Fri, 26 Jan 1996 02:43:06 -0800 (PST) Message-Id: <199601261043.CAA01515@silvia.HIP.Berkeley.EDU> To: joerg@freefall.freebsd.org CC: CVS-committers@freefall.freebsd.org, cvs-sbin@freefall.freebsd.org In-reply-to: <199601252344.PAA18190@freefall.freebsd.org> (message from Joerg Wunsch on Thu, 25 Jan 1996 15:44:34 -0800 (PST)) Subject: Re: cvs commit: src/sbin/newfs mkfs.c From: asami@cs.berkeley.edu (Satoshi Asami) Sender: owner-cvs-sbin@FreeBSD.ORG Precedence: bulk * Make the numbers for the "superblock backups" fit nicely on the screen, * even for larger partitions. Until now, partition sizes > 500 MB messed * up the screen. Hey, how about this one. I think the output looks even nicer, especially when you go over >5GB or >50GB. :) Satoshi P.S. I'm not sure if the terminal routine is supposed to wrap to the beginning of the line when you write to the last char...it works here, but if it looks funny at your place, you may need to change "i+j>width" to "i+j>=width">... ------- Index: mkfs.c =================================================================== RCS file: /usr/cvs/src/sbin/newfs/mkfs.c,v retrieving revision 1.9 diff -c -r1.9 mkfs.c *** 1.9 1996/01/25 23:44:32 --- mkfs.c 1996/01/26 10:36:55 *************** *** 122,128 **** int fsi, fso; daddr_t alloc(); ! static int numbersperline(); mkfs(pp, fsys, fi, fo) struct partition *pp; --- 122,128 ---- int fsi, fso; daddr_t alloc(); ! static int charsperline(); mkfs(pp, fsys, fi, fo) struct partition *pp; *************** *** 138,143 **** --- 138,145 ---- time_t utime; quad_t sizepb; void started(); + int width; + char tmpbuf[100]; /* XXX this will break in about 2,500 years */ #ifndef STANDALONE time(&utime); *************** *** 621,635 **** * then print out indices of cylinder groups. */ if (!mfs) ! printf("super-block backups (for fsck -b #) at:"); ! i = numbersperline(sblock.fs_size * NSPF(&sblock)); for (cylno = 0; cylno < sblock.fs_ncg; cylno++) { initcg(cylno, utime); if (mfs) continue; ! if (cylno % i == 0) printf("\n"); ! printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno))); fflush(stdout); } if (!mfs) --- 623,643 ---- * then print out indices of cylinder groups. */ if (!mfs) ! printf("super-block backups (for fsck -b #) at:\n"); ! i = 0; ! width = charsperline(); for (cylno = 0; cylno < sblock.fs_ncg; cylno++) { initcg(cylno, utime); if (mfs) continue; ! j = sprintf(tmpbuf, " %d,", ! fsbtodb(&sblock, cgsblock(&sblock, cylno))); ! if (i+j > width) { printf("\n"); ! i = 0; ! } ! i += j; ! printf("%s", tmpbuf); fflush(stdout); } if (!mfs) *************** *** 1268,1290 **** } /* ! * Determine the number of block numbers that will nicely fit into a * single line. */ static int ! numbersperline(seccount) ! long seccount; { ! int i, columns; char *cp; struct winsize ws; extern char *getenv(); - for (i = 0; seccount; i++, seccount /= 10) - ; - i += 2; /* account for comma+space */ - columns = 0; if (ioctl(0, TIOCGWINSZ, &ws) != -1) columns = ws.ws_col; --- 1276,1293 ---- } /* ! * Determine the number of characters in a * single line. */ static int ! charsperline() { ! int columns; char *cp; struct winsize ws; extern char *getenv(); columns = 0; if (ioctl(0, TIOCGWINSZ, &ws) != -1) columns = ws.ws_col; *************** *** 1292,1299 **** columns = atoi(cp); if (columns == 0) columns = 80; /* last resort */ ! i = columns / i; ! if (i < 3) ! i = 3; /* don't care */ ! return i; } --- 1295,1299 ---- columns = atoi(cp); if (columns == 0) columns = 80; /* last resort */ ! return columns; }