summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
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