summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-02 20:02:11 +0000
committerphk <phk@FreeBSD.org>2003-05-02 20:02:11 +0000
commitda6f75bd5477191b2991994e68d6f3ff4a9bdda1 (patch)
tree9ba280b03affde831f6f18050e3da1b2fea91ecb /sbin/bsdlabel/bsdlabel.c
parent55aa7c2b5c7e0ac4b88c32f0354da8d0ed90062d (diff)
downloadFreeBSD-src-da6f75bd5477191b2991994e68d6f3ff4a9bdda1.zip
FreeBSD-src-da6f75bd5477191b2991994e68d6f3ff4a9bdda1.tar.gz
Default the location to the compiled for architecture if no -m arg specified.
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 60d6caa..e4128eb 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -168,9 +168,14 @@ int installboot; /* non-zero if we should install a boot program */
char *xxboot; /* primary boot */
char boot0[MAXPATHLEN];
-static int labeloffset;
-static int bbsize;
-static int alphacksum;
+static int labeloffset = LABELOFFSET;
+static int bbsize = BBSIZE;
+static int alphacksum =
+#if defined(__alpha__)
+ 1;
+#else
+ 0;
+#endif
enum {
UNSPEC, EDIT, READ, RESTORE, WRITE, WRITEBOOT
@@ -217,6 +222,7 @@ main(int argc, char *argv[])
if (!strcmp(optarg, "i386")) {
labeloffset = 512;
bbsize = 8192;
+ alphacksum = 0;
} else if (!strcmp(optarg, "alpha")) {
labeloffset = 64;
bbsize = 8192;
OpenPOWER on IntegriCloud