PERFORCE change 110196 for review
Warner Losh
imp at FreeBSD.org
Tue Nov 21 17:17:42 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110196
Change 110196 by imp at 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);
More information about the p4-projects
mailing list