megactl/debian/patches/008-device_id.patch
2025-08-06 17:01:19 +02:00

18 lines
750 B
Diff

Author: Mario Fetka (geos_one) <mario.fetka@gmail.com>
Description: add device_id to output
thx. to gentoo devs
--- megactl.orig/src/adapter.c
+++ megactl/src/adapter.c
@@ -193,9 +193,9 @@ struct physical_drive_info *getPhysicalD
d->id = info->slot;
if (d->channel == DISK_NOENC)
- snprintf (d->name, sizeof (d->name), "%se*s%u", a->name, d->id);
+ snprintf (d->name, sizeof (d->name), "d%u%se*s%u", info->device_id, a->name, d->id);
else
- snprintf (d->name, sizeof (d->name), "%se%us%u", a->name, d->channel, d->id);
+ snprintf (d->name, sizeof (d->name), "d%u%se%us%u", info->device_id, a->name, d->channel, d->id);
d->inquiry = info->inquiry.inq;
strncpy (d->vendor, d->inquiry.vendor_info, sizeof (d->vendor) - 1);