summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-07 22:02:01 +0000
committerphk <phk@FreeBSD.org>2003-06-07 22:02:01 +0000
commitd25df9535be030baf3be969e48b789bc32d026cb (patch)
treedf88e2a9a1ec3b40dfe65fa544cee412cdb1567c /sbin
parent089df92b4296111bbabf01c3f6c5804ffe5ff715 (diff)
downloadFreeBSD-src-d25df9535be030baf3be969e48b789bc32d026cb.zip
FreeBSD-src-d25df9535be030baf3be969e48b789bc32d026cb.tar.gz
Augh! Fix the sparc64 build:
If we don't have a default label location for the compiled architecture, insist that a -m <architecture> option is specified.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/bsdlabel/bsdlabel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 2ac39eb..e2c84fe 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 <architecture> option must be specified");
/* Figure out the names of the thing we're working on */
if (argv[0][0] != '/') {
OpenPOWER on IntegriCloud