From owner-p4-projects@FreeBSD.ORG Tue Nov 21 17:21:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D09916CF36; Tue, 21 Nov 2006 17:20:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 285BB16AF9C for ; Tue, 21 Nov 2006 17:20:33 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B1E343F99 for ; Tue, 21 Nov 2006 17:14:44 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kALHF7kE066850 for ; Tue, 21 Nov 2006 17:15:07 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kALHF7FG066833 for perforce@freebsd.org; Tue, 21 Nov 2006 17:15:07 GMT (envelope-from imp@freebsd.org) Date: Tue, 21 Nov 2006 17:15:07 GMT Message-Id: <200611211715.kALHF7FG066833@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110196 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2006 17:21:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=110196 Change 110196 by imp@imp_lighthouse on 2006/11/18 08:36:39 remove a little debugging. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#29 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#29 (text+ko) ==== @@ -172,14 +172,11 @@ xputchar('\n'); autoboot = 0; c = 0; - printf("cmd is '%s'\n", cmd); if (parse()) xputchar('\a'); #ifdef XMODEM_DL else if (*cmd == '*') - Update(); - else if (*cmd == '#') - reset(); + Update(); #endif else load(); @@ -263,7 +260,6 @@ struct dos_partition *dp; struct disklabel *d; char *sec; - int i; if (!dsk_meta) { sec = dmadat->secbuf; @@ -271,16 +267,12 @@ if (drvread(sec, DOSBBSECTOR, 1)) return -1; dp = (void *)(sec + DOSPARTOFF); - for (i = 0; i < NDOSPART; i++) { - if (dp[i].dp_typ == DOSPTYP_386BSD) - break; - } - if (i == NDOSPART) + if (dp[0].dp_typ != DOSPTYP_386BSD) return -1; // Although dp_start is aligned within the disk partition structure, // DOSPARTOFF is 446, which is only word (2) aligned, not longword (4) // aligned. Cope by using memcpy to fetch the start of this partition. - memcpy(&dsk_start, &dp[i].dp_start, 4); + memcpy(&dsk_start, &dp[0].dp_start, 4); if (drvread(sec, dsk_start + LABELSECTOR, 1)) return -1; d = (void *)(sec + LABELOFFSET);