diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-21 16:02:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-05-21 16:02:34 +0000 |
commit | aa62119c08c04bf97c5260bdcf6ac81f70683db2 (patch) | |
tree | d8351e276c7fe5c79d30fd19693cd098869710e3 /sbin/disklabel | |
parent | fb1b4d7f6f684f3e219ceae5eebfc7480f1cf344 (diff) |
better disklabel -e messaging
Diffstat (limited to 'sbin/disklabel')
-rw-r--r-- | sbin/disklabel/disklabel.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 207fd72bb34..3ca00a91f6e 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.30 1997/04/20 08:59:40 deraadt Exp $ */ +/* $OpenBSD: disklabel.c,v 1.31 1997/05/21 16:02:33 deraadt Exp $ */ /* $NetBSD: disklabel.c,v 1.30 1996/03/14 19:49:24 ghudson Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: disklabel.c,v 1.30 1997/04/20 08:59:40 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: disklabel.c,v 1.31 1997/05/21 16:02:33 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -918,10 +918,20 @@ edit(lp, f) FILE *fp; if ((fd = mkstemp(tmpfil)) == -1 || (fp = fdopen(fd, "w")) == NULL) { + if (fd != -1) + close(fd); warn("%s", tmpfil); return (1); } display(fp, lp); + fprintf(fp, "\n# Notes:\n"); + fprintf(fp, +"# Up to 16 partitions are valid, named from 'a' to 'p'. Partition 'a' is\n" +"# your root filesystem, 'b' is your swap, and 'c' should cover your whole\n" +"# disk. Any other partition is free for any use. 'size' and 'offset' are\n" +"# in 512-byte blocks. fstype should be '4.2BSD', 'swap', or 'none' or some\n" +"# other values. fsize/bsize/cpg should typically be '1024 8192 16' for a\n" +"# 4.2BSD filesystem (or '512 4096 16' except on alpha, sun4, amiga, sun3...)\n"); fclose(fp); for (;;) { if (!editit()) |