fat_io_lib port WIP
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m12s

This commit is contained in:
2026-02-26 23:33:03 +01:00
parent 9758d79303
commit baa13fb695
15 changed files with 3607 additions and 18 deletions

View File

@@ -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, &sector_size, NULL, NULL,
NULL);
ret = device_op (back_device, XDRV_GET_SECTOR_SIZE, proc, rctx, &sector_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, &sector, &off, &sector_size, dest);
ret = device_op (back_device, XDRV_READ, proc, rctx, &sector, &sector_count, dest);
}
spin_unlock (&back_device->lock);