From 7838fd0ebe42ca31c7082657f0d685256e407bb9 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 2 May 2003 20:02:11 +0000 Subject: [PATCH] Default the location to the compiled for architecture if no -m arg specified. --- sbin/bsdlabel/bsdlabel.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 60d6caa539a0..e4128eb5c442 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;