-/* $OpenBSD: subr_disk.c,v 1.262 2022/09/11 19:34:40 miod Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.263 2022/09/15 09:08:29 krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
major(bp->b_dev), minor(bp->b_dev));
break;
}
- printf("readdoslabel(new) enter: %s, spoofonly %d, partoffp %sNULL\n",
+ printf("readdoslabel enter: %s, spoofonly %d, partoffp %sNULL\n",
devname, spoofonly, (partoffp == NULL) ? "" : "not ");
#endif /* DEBUG */
error = readdisksector(bp, strat, lp, DOSBBSECTOR);
if (error) {
- DPRINTF("readdoslabel(new) return: %s, %d -- lp unchanged, "
+ DPRINTF("readdoslabel return: %s, %d -- lp unchanged, "
"DOSBBSECTOR read error\n", devname, error);
return error;
}
if (nlp.d_magic != DISKMAGIC)
spooffat(dosbb, &nlp, &partoff);
if (nlp.d_magic != DISKMAGIC) {
- DPRINTF("readdoslabel(new): N/A -- label partition @ "
+ DPRINTF("readdoslabel: N/A -- label partition @ "
"daddr_t 0 (default)\n");
partoff = 0;
}
* lp is copied into it. So leave lp alone!
*/
if (partoff == -1) {
- DPRINTF("readdoslabel(new) return: %s, ENXIO, lp "
+ DPRINTF("readdoslabel return: %s, ENXIO, lp "
"unchanged, *partoffp unchanged\n", devname);
return ENXIO;
}
*partoffp = partoff;
- DPRINTF("readdoslabel(new) return: %s, 0, lp unchanged, "
+ DPRINTF("readdoslabel return: %s, 0, lp unchanged, "
"*partoffp set to %lld\n", devname, *partoffp);
return 0;
}
lp->d_checksum = dkcksum(lp);
if (spoofonly || partoff == -1) {
- DPRINTF("readdoslabel(new) return: %s, 0, lp spoofed\n",
+ DPRINTF("readdoslabel return: %s, 0, lp spoofed\n",
devname);
return 0;
}
partoff += DOS_LABELSECTOR;
error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, partoff));
if (error) {
- DPRINTF("readdoslabel(new) return: %s, %d, lp read failed\n",
+ DPRINTF("readdoslabel return: %s, %d, lp read failed\n",
devname, error);
return bp->b_error;
}
rlp = (struct disklabel *)(bp->b_data + DL_BLKOFFSET(lp, partoff));
error = checkdisklabel(rlp, lp, DL_GETBSTART(rlp), DL_GETBEND(rlp));
- DPRINTF("readdoslabel(new) return: %s, %d, checkdisklabel() of daddr_t "
+ DPRINTF("readdoslabel return: %s, %d, checkdisklabel() of daddr_t "
"%lld %s\n", devname, error, partoff, error ? "failed" : "ok");
return error;
obsdfound = 0;
for (i = 0; i < partnum; i++) {
if (letoh64(gp[i].gp_attrs) & GPTPARTATTR_REQUIRED) {
- DPRINTF("spoofgpt: Skipping partition %u (REQUIRED)\n");
+ DPRINTF("spoofgpt: Skipping partition %u (REQUIRED)\n",
+ i);
continue;
}
free(gp, M_DEVBUF, gpbytes);
#ifdef DEBUG
- printf("readdoslabel(new): GPT -- ");
+ printf("readdoslabel: GPT -- ");
if (partoff == -1)
printf("no label partition\n");
else if (obsdfound == 0)
lp->d_magic = DISKMAGIC;
*partoffp = partoff;
#ifdef DEBUG
- printf("readdoslabel(new): MBR -- ");
+ printf("readdoslabel: MBR -- ");
if (partoff == -1)
printf("no label partition\n");
else if (obsdfound == 0)
lp->d_partitions['i' - 'a'].p_fstype = FS_MSDOS;
*partoffp = -1;
lp->d_magic = DISKMAGIC;
- DPRINTF("readdoslabel(new): FAT -- no label partition\n");
+ DPRINTF("readdoslabel: FAT -- no label partition\n");
}
}