Implement storage device partition rescan (XDRV_PARTITION_RESCAN), Self-hosted installation WIP
All checks were successful
Build ISO image / build-and-deploy (push) Successful in 35s
Build documentation / build-and-deploy (push) Successful in 27s

This commit is contained in:
2026-04-16 00:09:46 +02:00
parent 16cb7fd7bd
commit 288a4b4e83
27 changed files with 1565 additions and 147 deletions

View File

@@ -14,7 +14,7 @@
static int device_probe_partitions_dos (struct proc* proc, struct reschedule_ctx* rctx,
struct device* device) {
uint64_t fd;
uint64_t fd, fsd;
struct dos_mbr mbr;
memset (&mbr, 0, sizeof (mbr));
@@ -28,6 +28,7 @@ static int device_probe_partitions_dos (struct proc* proc, struct reschedule_ctx
[XDRV_GET_DEVICE_TYPE] = &partdrv_get_device_type,
[XDRV_READ] = &partdrv_read,
[XDRV_WRITE] = &partdrv_write,
[XDRV_PARTITION_RESCAN] = &partdrv_partition_rescan,
};
spin_lock (&device->lock, &fd);
@@ -59,8 +60,12 @@ static int device_probe_partitions_dos (struct proc* proc, struct reschedule_ctx
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%sp%zu", device->key, i);
device_create (DEVICE_TYPE_DRIVE, key, ops, lengthof (ops), &partdrv_init, &partdrv_fini, &init,
proc, rctx);
struct device* part_dev = device_create (DEVICE_TYPE_DRIVE, key, ops, lengthof (ops),
&partdrv_init, &partdrv_fini, &init, proc, rctx);
spin_lock (&part_dev->lock, &fsd);
list_append (device->subdevices, &part_dev->subdevices_link);
spin_unlock (&part_dev->lock, fsd);
}
spin_unlock (&device->lock, fd);