attach_storage(): fix sector range for reading MBR from disk
The range parameter in block_io functions is expressed in sectors,
not bytes, thus attach_storage() was reading the first 512 sectors
from an attached disk instead of just the first sector. Fix it.
@@ -222,7 +222,7 @@ closure_function(0, 3, void, attach_storage,
deallocate(h, mbr, SECTOR_SIZE);
return;
}
- apply(r, mbr, irange(0, SECTOR_SIZE), sh);
+ apply(r, mbr, irange(0, 1), sh);
}
static void read_kernel_syms()
