XHInqDev works now
This commit is contained in:
@@ -38,6 +38,18 @@ int getcookie(uint32_t cookie, uint32_t *p_value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void print_bpb(_BPB *bpb)
|
||||
{
|
||||
printf("\t\trecsiz = %d\r\n", bpb->recsiz);
|
||||
printf("\t\tclsiz = %d\r\n", bpb->clsiz);
|
||||
printf("\t\tclsizb = %d\r\n", bpb->clsizb);
|
||||
printf("\t\trdlen = %d\r\n", bpb->rdlen);
|
||||
printf("\t\tfsiz = %d\r\n", bpb->fsiz);
|
||||
printf("\t\tfatrec = %d\r\n", bpb->fatrec);
|
||||
printf("\t\tdatrec = %d\r\n", bpb->datrec);
|
||||
printf("\t\tnumcl = %d\r\n", bpb->numcl);
|
||||
printf("\t\tbflags = %x\r\n", bpb->bflags);
|
||||
}
|
||||
void xhdi_test(void)
|
||||
{
|
||||
long drvmap;
|
||||
@@ -56,15 +68,17 @@ void xhdi_test(void)
|
||||
uint16_t minor = 0;
|
||||
long start_sector = 0L;
|
||||
uint32_t ret;
|
||||
_BPB *bpb = NULL;
|
||||
_BPB *bpb;
|
||||
|
||||
if ((drvmap >> i) & 1)
|
||||
{
|
||||
ret = XHInqDev(xhdi, i, &major, &minor, &start_sector, &bpb);
|
||||
//if (ret == E_OK)
|
||||
if (ret == E_OK || ret == EDRVNR)
|
||||
{
|
||||
printf("drive %d returned %d:\r\n", i, ret);
|
||||
printf("\tmajor = %d, minor = %d, start_sector = %lx, bpb = %p\r\n", major & 0xff, minor & 0xff, start_sector, bpb);
|
||||
if (bpb != NULL)
|
||||
print_bpb(bpb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user