Date: Tue, 21 Nov 2006 16:16:26 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110196 for review Message-ID: <200611211616.kALGGQCv045132@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611211616.kALGGQCv045132>