From owner-svn-src-all@FreeBSD.ORG Thu Mar 10 08:24:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 935B71065680; Thu, 10 Mar 2011 08:24:21 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 787E48FC08; Thu, 10 Mar 2011 08:24:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2A8OLXf036428; Thu, 10 Mar 2011 08:24:21 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2A8OL5G036425; Thu, 10 Mar 2011 08:24:21 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201103100824.p2A8OL5G036425@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 10 Mar 2011 08:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219448 - head/sbin/bsdlabel X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2011 08:24:21 -0000 Author: uqs Date: Thu Mar 10 08:24:21 2011 New Revision: 219448 URL: http://svn.freebsd.org/changeset/base/219448 Log: Remove dead code in bsdlabel depending on __alpha__ Modified: head/sbin/bsdlabel/bsdlabel.8 head/sbin/bsdlabel/bsdlabel.c Modified: head/sbin/bsdlabel/bsdlabel.8 ============================================================================== --- head/sbin/bsdlabel/bsdlabel.8 Thu Mar 10 08:24:10 2011 (r219447) +++ head/sbin/bsdlabel/bsdlabel.8 Thu Mar 10 08:24:21 2011 (r219448) @@ -31,7 +31,7 @@ .\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 8, 2007 +.Dd March 5, 2011 .Dt BSDLABEL 8 .Os .Sh NAME @@ -109,9 +109,9 @@ argument forces .Nm to use a layout suitable for a different architecture. Current valid values are -.Cm i386 , amd64 , ia64 , pc98 , +.Cm i386 , amd64 , ia64 , and -.Cm alpha . +.Cm pc98 . If this option is omitted, .Nm will use a layout suitable for the current machine. Modified: head/sbin/bsdlabel/bsdlabel.c ============================================================================== --- head/sbin/bsdlabel/bsdlabel.c Thu Mar 10 08:24:10 2011 (r219447) +++ head/sbin/bsdlabel/bsdlabel.c Thu Mar 10 08:24:21 2011 (r219448) @@ -129,12 +129,6 @@ static uint32_t lba_offset; static int labelsoffset = LABELSECTOR; 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 @@ -176,12 +170,6 @@ main(int argc, char *argv[]) labelsoffset = 1; labeloffset = 0; bbsize = 8192; - alphacksum = 0; - } else if (!strcmp(optarg, "alpha")) { - labelsoffset = 0; - labeloffset = 64; - bbsize = 8192; - alphacksum = 1; } else { errx(1, "Unsupported architecture"); } @@ -350,7 +338,6 @@ readboot(void) { int fd; struct stat st; - uint64_t *p; if (xxboot == NULL) xxboot = "/boot/boot"; @@ -358,21 +345,7 @@ readboot(void) if (fd < 0) err(1, "cannot open %s", xxboot); fstat(fd, &st); - if (alphacksum && st.st_size <= BBSIZE - 512) { - if (read(fd, bootarea + 512, st.st_size) != st.st_size) - err(1, "read error %s", xxboot); - - /* - * Set the location and length so SRM can find the - * boot blocks. - */ - p = (uint64_t *)bootarea; - p[60] = (st.st_size + secsize - 1) / secsize; - p[61] = 1; - p[62] = 0; - close(fd); - return; - } else if ((!alphacksum) && st.st_size <= BBSIZE) { + if (st.st_size <= BBSIZE) { if (read(fd, bootarea, st.st_size) != st.st_size) err(1, "read error %s", xxboot); close(fd); @@ -407,7 +380,6 @@ geom_bsd_available(void) static int writelabel(void) { - uint64_t *p, sum; int i, fd, serrno; struct gctl_req *grq; char const *errstr; @@ -430,12 +402,6 @@ writelabel(void) lab.d_partitions[i].p_offset += lba_offset; bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize, lp); - if (alphacksum) { - /* Generate the bootblock checksum for the SRM console. */ - for (p = (uint64_t *)bootarea, i = 0, sum = 0; i < 63; i++) - sum += p[i]; - p[63] = sum; - } fd = open(specname, O_RDWR); if (fd < 0) {