add device id patch

This commit is contained in:
Mario Fetka 2017-04-22 17:21:07 +02:00
parent 43e942c2b5
commit 0795bec8ef
2 changed files with 22 additions and 0 deletions

21
debian/patches/008-device_id.dpatch vendored Executable file
View File

@ -0,0 +1,21 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 008-device_id.dpatch by Mario Fetka (geos_one) <mario.fetka@gmail.com>
##
## DP: add device_id to output
## DP: thx. to gentoo devs
@DPATCH@
--- megactl/src/adapter.c.orig 2017-04-22 17:15:55.068000000 +0200
+++ megactl/src/adapter.c 2017-04-22 17:17:17.624000000 +0200
@@ -193,9 +193,9 @@
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);

View File

@ -5,3 +5,4 @@
005-Makefile.dpatch 005-Makefile.dpatch
006-gcc-fixes.dpatch 006-gcc-fixes.dpatch
007-tracefix.dpatch 007-tracefix.dpatch
008-device_id.dpatch