From 9ef521ec86ebe5b35913a369da78031c93fc16cd Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 7 Jun 2003 22:02:01 +0000 Subject: [PATCH] Augh! Fix the sparc64 build: If we don't have a default label location for the compiled architecture, insist that a -m option is specified. --- sbin/bsdlabel/bsdlabel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 2ac39eb60987..e2c84fe97e64 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -125,6 +125,12 @@ static int allfields; /* present all fields in edit */ static char const *xxboot; /* primary boot */ static off_t mbroffset; +#ifndef LABELSECTOR +#define LABELSECTOR -1 +#endif +#ifndef LABELOFFSET +#define LABELOFFSET -1 +#endif static int labelsoffset = LABELSECTOR; static int labeloffset = LABELOFFSET; static int bbsize = BBSIZE; @@ -211,6 +217,8 @@ main(int argc, char *argv[]) if (argc < 1) usage(); + if (labelsoffset < 0 || labeloffset < 0) + errx(1, "a -m option must be specified"); /* Figure out the names of the thing we're working on */ if (argv[0][0] != '/') {