From 8de54cb8637dd987220132a2e271da6d2ce5140d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Fri, 9 Oct 2015 18:33:45 +0200 Subject: [PATCH] Better testing with fake devices --- cmdline/device.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmdline/device.c b/cmdline/device.c index dfef1ef8..c52dbf0d 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -892,7 +892,12 @@ static int devtest(tommy_list* low, int operation) switch (c) { case 0 : entry->smart[j] = 0; break; case 1 : entry->smart[j] = SMART_UNASSIGNED; break; - default : entry->smart[j] = c; break; + default: + if (j == 193) + entry->smart[j] = c - 2; + else + entry->smart[j] = 0; + break; } }