aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-06-07 22:02:01 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-06-07 22:02:01 +0000
commit9ef521ec86ebe5b35913a369da78031c93fc16cd (patch)
treedf88e2a9a1ec3b40dfe65fa544cee412cdb1567c /sbin/bsdlabel/bsdlabel.c
parent1021f44ab976186fbc3b9e99cc67fd9c9423e04c (diff)
downloadsrc-9ef521ec86ebe5b35913a369da78031c93fc16cd.tar.gz
src-9ef521ec86ebe5b35913a369da78031c93fc16cd.zip
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.
Notes
Notes: svn path=/head/; revision=115995
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-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 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 <architecture> option must be specified");
/* Figure out the names of the thing we're working on */
if (argv[0][0] != '/') {