IDE interrupt based driver
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m36s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m36s
This commit is contained in:
@@ -85,14 +85,14 @@ int tarfs_mount (struct vfs_volume* volume, struct proc* proc, struct reschedule
|
||||
|
||||
spin_lock (&back_device->lock, &fd);
|
||||
|
||||
ret = device_op (back_device, XDRV_GET_SIZE, NULL, NULL, &total_size);
|
||||
ret = device_op (back_device, XDRV_GET_SIZE, proc, rctx, &fd, &total_size);
|
||||
if (ret < 0) {
|
||||
spin_unlock (&back_device->lock, fd);
|
||||
free (volume->udata);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = device_op (back_device, XDRV_GET_SECTOR_SIZE, NULL, NULL, §or_size);
|
||||
ret = device_op (back_device, XDRV_GET_SECTOR_SIZE, proc, rctx, &fd, §or_size);
|
||||
if (ret < 0) {
|
||||
spin_unlock (&back_device->lock, fd);
|
||||
free (volume->udata);
|
||||
@@ -111,7 +111,7 @@ int tarfs_mount (struct vfs_volume* volume, struct proc* proc, struct reschedule
|
||||
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 = device_op (back_device, XDRV_READ, proc, rctx, §or, §or_count, dest);
|
||||
ret = device_op (back_device, XDRV_READ, proc, rctx, &fd, §or, §or_count, dest);
|
||||
}
|
||||
|
||||
spin_unlock (&back_device->lock, fd);
|
||||
|
||||
Reference in New Issue
Block a user