Remove debug messages

This commit is contained in:
Ben Gras 2005-08-10 15:13:13 +00:00
parent 2a165d972e
commit 244b1db564

View File

@ -25,7 +25,7 @@ PUBLIC int cdprobe(void)
#define AT_MINORS 4 #define AT_MINORS 4
int i, minors[AT_MINORS] = { 0, 5, 10, 15 }, dev = 0, found = 0; int i, minors[AT_MINORS] = { 0, 5, 10, 15 }, dev = 0, found = 0;
char pvd[CD_SECTOR]; char pvd[CD_SECTOR];
printf("\nLooking for boot CD. This may take several minutes.\n" printf("\nLooking for boot CD. This may take a minute.\n"
"Please ignore any error messages.\n\n"); "Please ignore any error messages.\n\n");
for(i = 0; i < AT_MINORS && !found; i++) { for(i = 0; i < AT_MINORS && !found; i++) {
struct super_block probe_super; struct super_block probe_super;
@ -36,15 +36,12 @@ PUBLIC int cdprobe(void)
/* Open device readonly. (This fails if the device /* Open device readonly. (This fails if the device
* is also writable, which a CD isn't.) * is also writable, which a CD isn't.)
*/ */
printf("%d", i);
if((r = dev_open(dev, FS_PROC_NR, RO_BIT)) != OK) { if((r = dev_open(dev, FS_PROC_NR, RO_BIT)) != OK) {
printf("ro", i);
continue; continue;
} }
if((r = dev_io(DEV_READ, dev, FS_PROC_NR, pvd, if((r = dev_io(DEV_READ, dev, FS_PROC_NR, pvd,
16*CD_SECTOR, sizeof(pvd), 0)) != sizeof(pvd)) { 16*CD_SECTOR, sizeof(pvd), 0)) != sizeof(pvd)) {
printf("rpvd", i);
dev_close(dev); dev_close(dev);
continue; continue;
} }
@ -54,7 +51,6 @@ PUBLIC int cdprobe(void)
if(pvd[0] != 1 || pvd[1] != 'C' || pvd[2] != 'D' || if(pvd[0] != 1 || pvd[1] != 'C' || pvd[2] != 'D' ||
pvd[3] != '0' || pvd[4] != '0' || pvd[5] != '1' || pvd[6] != 1 || pvd[3] != '0' || pvd[4] != '0' || pvd[5] != '1' || pvd[6] != 1 ||
strncmp(pvd + 40, "MINIX", 5)) { strncmp(pvd + 40, "MINIX", 5)) {
printf("vpvd", i, r);
continue; continue;
} }
@ -62,14 +58,12 @@ PUBLIC int cdprobe(void)
for(minor = minors[i]+2; minor <= minors[i]+3; minor++) { for(minor = minors[i]+2; minor <= minors[i]+3; minor++) {
dev = (AT_MAJOR << MAJOR) | minor; dev = (AT_MAJOR << MAJOR) | minor;
if((r = dev_open(dev, FS_PROC_NR, R_BIT)) != OK) { if((r = dev_open(dev, FS_PROC_NR, R_BIT)) != OK) {
printf("[o%d]\n", minor);
break; break;
} }
probe_super.s_dev = dev; probe_super.s_dev = dev;
r = read_super(&probe_super); r = read_super(&probe_super);
dev_close(dev); dev_close(dev);
if(r != OK) { if(r != OK) {
printf("fs[%d]", minor);
break; break;
} }
} }
@ -82,8 +76,6 @@ PUBLIC int cdprobe(void)
} }
} }
printf("\nCD probe done.\n");
if(!found) return NO_DEV; if(!found) return NO_DEV;
return dev; return dev;