fat12: slightly simpler logic?
This commit is contained in:
7
fat12.c
7
fat12.c
@@ -23,7 +23,6 @@ typedef struct {
|
||||
static uint8_t* gFat;
|
||||
static direntry* gRootdir;
|
||||
|
||||
|
||||
static int readsector(int c, int h, int s, uint8_t* addr) {
|
||||
register uint8_t* dest asm ("bx") = addr;
|
||||
register uint8_t nsects asm ("al") = 1;
|
||||
@@ -41,10 +40,8 @@ static int readsector(int c, int h, int s, uint8_t* addr) {
|
||||
: "=r" (ret)
|
||||
: "r" (dest), "r" (nsects), "r" (func), "r" (sect),
|
||||
"r" (cyl), "r" (head), "r" (drive), "r" (seg));
|
||||
if (ret == 0x80) {
|
||||
continue;
|
||||
} else {
|
||||
return ret;
|
||||
if (ret != 0x80) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user