diff options
| author | Philippe Charnier <charnier@FreeBSD.org> | 1998-06-08 06:41:47 +0000 |
|---|---|---|
| committer | Philippe Charnier <charnier@FreeBSD.org> | 1998-06-08 06:41:47 +0000 |
| commit | 3121d4cbe0e74ae75e281626834aaf51908a7731 (patch) | |
| tree | dfba5f7f4479e8c784331531b083c8e0693fa7de | |
| parent | ea0be99955d962853ace605eb6d67adf74241264 (diff) | |
Notes
| -rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 22 | ||||
| -rw-r--r-- | sbin/disklabel/disklabel.c | 22 |
2 files changed, 20 insertions, 24 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 1d9273f92ee3..4bd1ea47a1c1 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94"; /* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ #endif static const char rcsid[] = - "$Id$"; + "$Id: disklabel.c,v 1.13 1998/06/04 06:49:13 charnier Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -248,9 +248,6 @@ main(argc, argv) switch(op) { - case UNSPEC: - break; - case EDIT: if (argc != 1) usage(); @@ -460,13 +457,14 @@ l_perror(s) switch (errno) { case ESRCH: - warnx("%s: no disk label on disk;\n" - "use \"disklabel -r\" to install initial label", s); + warnx("%s: no disk label on disk;", s); + fprintf(stderr, + "use \"disklabel -r\" to install initial label\n"); break; case EINVAL: - warnx("%s: label magic number or checksum is wrong!\n" - "(disklabel or kernel is out of date?)", s); + warnx("%s: label magic number or checksum is wrong!", s); + fprintf(stderr, "(disklabel or kernel is out of date?)\n"); break; case EBUSY: @@ -475,7 +473,7 @@ l_perror(s) case EXDEV: warnx( - "%s: labeled partition or 'a' partition must start at beginning of disk", s); + "%s: labeled partition or 'a' partition must start at beginning of disk", s); break; default: @@ -505,9 +503,9 @@ readlabel(f) break; if (lp > (struct disklabel *)(bootarea+BBSIZE-sizeof(*lp)) || lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC || - dkcksum(lp) != 0) { - errx(1, "bad pack magic number (label is damaged, or pack is unlabeled)"); - } + dkcksum(lp) != 0) + errx(1, + "bad pack magic number (label is damaged, or pack is unlabeled)"); } else { lp = &lab; if (ioctl(f, DIOCGDINFO, lp) < 0) diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 1d9273f92ee3..4bd1ea47a1c1 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94"; /* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ #endif static const char rcsid[] = - "$Id$"; + "$Id: disklabel.c,v 1.13 1998/06/04 06:49:13 charnier Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -248,9 +248,6 @@ main(argc, argv) switch(op) { - case UNSPEC: - break; - case EDIT: if (argc != 1) usage(); @@ -460,13 +457,14 @@ l_perror(s) switch (errno) { case ESRCH: - warnx("%s: no disk label on disk;\n" - "use \"disklabel -r\" to install initial label", s); + warnx("%s: no disk label on disk;", s); + fprintf(stderr, + "use \"disklabel -r\" to install initial label\n"); break; case EINVAL: - warnx("%s: label magic number or checksum is wrong!\n" - "(disklabel or kernel is out of date?)", s); + warnx("%s: label magic number or checksum is wrong!", s); + fprintf(stderr, "(disklabel or kernel is out of date?)\n"); break; case EBUSY: @@ -475,7 +473,7 @@ l_perror(s) case EXDEV: warnx( - "%s: labeled partition or 'a' partition must start at beginning of disk", s); + "%s: labeled partition or 'a' partition must start at beginning of disk", s); break; default: @@ -505,9 +503,9 @@ readlabel(f) break; if (lp > (struct disklabel *)(bootarea+BBSIZE-sizeof(*lp)) || lp->d_magic != DISKMAGIC || lp->d_magic2 != DISKMAGIC || - dkcksum(lp) != 0) { - errx(1, "bad pack magic number (label is damaged, or pack is unlabeled)"); - } + dkcksum(lp) != 0) + errx(1, + "bad pack magic number (label is damaged, or pack is unlabeled)"); } else { lp = &lab; if (ioctl(f, DIOCGDINFO, lp) < 0) |
