fat_io_lib port WIP
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m12s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m12s
This commit is contained in:
@@ -71,15 +71,14 @@ int tarfs_mount (struct vfs_volume* volume, struct proc* proc, struct reschedule
|
||||
|
||||
spin_lock (&back_device->lock);
|
||||
|
||||
ret = back_device->ops[XDRV_GET_SIZE](back_device, proc, rctx, &total_size, NULL, NULL, NULL);
|
||||
ret = device_op (back_device, XDRV_GET_SIZE, proc, rctx, &total_size);
|
||||
if (ret < 0) {
|
||||
spin_unlock (&back_device->lock);
|
||||
free (volume->udata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = back_device->ops[XDRV_GET_SECTOR_SIZE](back_device, proc, rctx, §or_size, NULL, NULL,
|
||||
NULL);
|
||||
ret = device_op (back_device, XDRV_GET_SECTOR_SIZE, proc, rctx, §or_size);
|
||||
if (ret < 0) {
|
||||
spin_unlock (&back_device->lock);
|
||||
free (volume->udata);
|
||||
@@ -94,10 +93,10 @@ int tarfs_mount (struct vfs_volume* volume, struct proc* proc, struct reschedule
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t off = 0;
|
||||
size_t sector_count = 1;
|
||||
for (size_t sector = 0; sector < total_size / sector_size; sector++) {
|
||||
uint8_t* dest = (uint8_t*)((uintptr_t)buffer + (sector * sector_size));
|
||||
ret = back_device->ops[XDRV_READ](back_device, proc, rctx, §or, &off, §or_size, dest);
|
||||
ret = device_op (back_device, XDRV_READ, proc, rctx, §or, §or_count, dest);
|
||||
}
|
||||
|
||||
spin_unlock (&back_device->lock);
|
||||
|
||||
Reference in New Issue
Block a user