1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
|
/* $NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $ */
/*-
* Copyright (c) 2002, Pierre David <Pierre.David@crc.u-strasbg.fr>
* Copyright (c) 2006, Jung-uk Kim <jkim@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: amrctl.c,v 1.12 2020/09/06 02:34:02 mrg Exp $");
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <err.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <machine/param.h>
#include <dev/pci/amrio.h>
#include <dev/pci/amrreg.h>
#define NATTEMPTS 5
#define SLEEPTIME 100000 /* microseconds */
static int nattempts = NATTEMPTS; /* # of attempts before giving up */
static int sleeptime = SLEEPTIME; /* between attempts, in ms */
#define AMR_BUFSIZE 1024
static int enq_result = AMR_STATUS_FAILED;
static char enq_buffer[AMR_BUFSIZE];
#define AMR_MAX_NCTRLS 16
#define AMR_MAX_NSDEVS 16
static uint8_t nschan = 0;
/*
* Include lookup tables, and a function to match a code to a string.
*
* XXX Lookup tables cannot be included, since they require symbols from
* amrreg.h which need in turn the _KERNEL define.
*/
/* #define AMR_DEFINE_TABLES */
/* #include "amr_tables.h" */
static int amr_ioctl_enquiry(int, uint8_t, uint8_t, uint8_t);
__dead static void usage(const char *);
static int describe_card(int, int, int);
static char * describe_property(uint8_t, char *);
static const char * describe_state(int, uint8_t);
static void describe_battery(int, int, int, int, int);
static void describe_one_volume(int, int, uint32_t, uint8_t, uint8_t);
static void describe_one_drive(int, int, uint8_t);
static void describe_drive(int, int, int, int, int);
/*
* Offsets in an amr_user_ioctl.au_cmd [] array See amrio.h
*/
#define MB_COMMAND 0
#define MB_CHANNEL 1
#define MB_PARAM 2
#define MB_PAD 3
#define MB_DRIVE 4
#define FIRMWARE_40LD 1
#define FIRMWARE_8LD 2
static const struct {
const char *product;
const uint32_t signature;
} prodtable[] = {
{ "Series 431", AMR_SIG_431 },
{ "Series 438", AMR_SIG_438 },
{ "Series 762", AMR_SIG_762 },
{ "Integrated HP NetRAID (T5)", AMR_SIG_T5 },
{ "Series 466", AMR_SIG_466 },
{ "Series 467", AMR_SIG_467 },
{ "Integrated HP NetRAID (T7)", AMR_SIG_T7 },
{ "Series 490", AMR_SIG_490 }
};
static const struct {
const int code;
const char *ifyes, *ifno;
} proptable[] = {
{ AMR_DRV_WRITEBACK,
"writeback", "write-through" },
{ AMR_DRV_READHEAD,
"read-ahead", "no-read-ahead" },
{ AMR_DRV_ADAPTIVE,
"adaptative-io", "no-adaptative-io" }
};
static const struct {
const int code;
const char *status;
} statetable[] = {
{ AMR_DRV_OFFLINE, "offline" },
{ AMR_DRV_DEGRADED, "degraded" },
{ AMR_DRV_OPTIMAL, "optimal" },
{ AMR_DRV_ONLINE, "online" },
{ AMR_DRV_FAILED, "failed" },
{ AMR_DRV_REBUILD, "rebuild" },
{ AMR_DRV_HOTSPARE, "hotspare" }
};
static const struct {
const uint8_t code;
const char *status;
} battable[] = {
{ AMR_BATT_MODULE_MISSING, "not present" },
{ AMR_BATT_LOW_VOLTAGE, "low voltage" },
{ AMR_BATT_TEMP_HIGH, "high temperature" },
{ AMR_BATT_PACK_MISSING, "pack missing" },
{ AMR_BATT_CYCLES_EXCEEDED, "cycle exceeded" }
};
static const struct {
const uint8_t code;
const char *status;
} bcstatble[] = {
{ AMR_BATT_CHARGE_DONE, "charge done" },
{ AMR_BATT_CHARGE_INPROG, "charge in progress" },
{ AMR_BATT_CHARGE_FAIL, "charge failed" }
};
static int
amr_ioctl_enquiry(int fd, uint8_t cmd, uint8_t cmdsub, uint8_t cmdqual)
{
struct amr_user_ioctl am;
int r, i;
am.au_cmd[MB_COMMAND] = cmd;
am.au_cmd[MB_CHANNEL] = cmdsub;
am.au_cmd[MB_PARAM] = cmdqual;
am.au_cmd[MB_PAD] = 0;
am.au_cmd[MB_DRIVE] = 0;
am.au_buffer = enq_buffer;
am.au_length = AMR_BUFSIZE;
am.au_direction = AMR_IO_READ;
am.au_status = 0;
i = 0;
r = -1;
while (i < nattempts && r == -1) {
r = ioctl(fd, AMR_IO_COMMAND, &am);
if (r == -1) {
if (errno != EBUSY) {
warn("ioctl enquiry");
return -1;
} else
usleep(sleeptime);
}
i++;
}
return am.au_status;
}
static void
usage(const char *prog)
{
fprintf(stderr, "usage: %s stat [-a num] [-b] "
"[-f dev] [-g] [-l vol]\n\t\t"
"[-p drive|-s bus[:target]] [-t usec] [-v]\n\n\t"
"-a num\t\tnumber of retries\n\t"
"-b\t\tbattery status\n\t"
"-f dev\t\tdevice path\n\t"
"-g\t\tprint global parameters\n\t"
"-l vol\t\tlogical volume ID\n\t"
"-p drive\tphysical drive ID\n\t"
"-s bus[:target]\tSCSI bus (and optinal target)\n\t"
"-t usec\t\tsleep time between retries\n\t"
"-v\t\tverbose output\n",
prog);
exit(1);
}
/******************************************************************************
* Card description
*/
static int
describe_card(int fd, int verbosity, int globalparam)
{
struct amr_enquiry *ae;
uint32_t cardtype;
/*
* Try the 40LD firmware interface
*/
enq_result = amr_ioctl_enquiry(fd, AMR_CMD_CONFIG,
AMR_CONFIG_PRODUCT_INFO, 0);
if (enq_result == AMR_STATUS_SUCCESS) {
struct amr_prodinfo *ap;
ap = (struct amr_prodinfo *)enq_buffer;
nschan = ap->ap_nschan;
if (globalparam) {
printf("Product\t\t\t<%.80s>\n", ap->ap_product);
printf("Firmware\t\t%.16s\n", ap->ap_firmware);
printf("BIOS\t\t\t%.16s\n", ap->ap_bios);
printf("SCSI channels\t\t%d\n", ap->ap_nschan);
printf("Fibre loops\t\t%d\n", ap->ap_fcloops);
printf("Memory size\t\t%d MB\n", ap->ap_memsize);
if (verbosity >= 1) {
printf("Ioctl\t\t\t%d (%s)\n", FIRMWARE_40LD,
"40LD");
printf("Signature\t\t0x%08x\n",
ap->ap_signature);
printf("Configsig\t\t0x%08x\n",
ap->ap_configsig);
printf("Subsystem\t\t0x%04x\n",
ap->ap_subsystem);
printf("Subvendor\t\t0x%04x\n",
ap->ap_subvendor);
printf("Notify counters\t\t%d\n",
ap->ap_numnotifyctr);
}
}
return FIRMWARE_40LD;
}
/*
* Try the 8LD firmware interface
*/
enq_result = amr_ioctl_enquiry(fd, AMR_CMD_EXT_ENQUIRY2, 0, 0);
ae = (struct amr_enquiry *)enq_buffer;
if (enq_result == AMR_STATUS_SUCCESS) {
cardtype = ae->ae_signature;
} else {
enq_result = amr_ioctl_enquiry(fd, AMR_CMD_ENQUIRY, 0, 0);
cardtype = 0;
}
if (enq_result == AMR_STATUS_SUCCESS) {
if (globalparam) {
const char *product = NULL;
char bios[100], firmware[100];
size_t i;
for (i = 0; i < __arraycount(prodtable); i++) {
if (cardtype == prodtable[i].signature) {
product = prodtable[i].product;
break;
}
}
if (product == NULL)
product = "unknown card signature";
/*
* HP NetRaid controllers have a special encoding of
* the firmware and BIOS versions. The AMI version
* seems to have it as strings whereas the HP version
* does it with a leading uppercase character and two
* binary numbers.
*/
if (ae->ae_adapter.aa_firmware[2] >= 'A' &&
ae->ae_adapter.aa_firmware[2] <= 'Z' &&
ae->ae_adapter.aa_firmware[1] < ' ' &&
ae->ae_adapter.aa_firmware[0] < ' ' &&
ae->ae_adapter.aa_bios[2] >= 'A' &&
ae->ae_adapter.aa_bios[2] <= 'Z' &&
ae->ae_adapter.aa_bios[1] < ' ' &&
ae->ae_adapter.aa_bios[0] < ' ') {
/*
* looks like we have an HP NetRaid version
* of the MegaRaid
*/
if (cardtype == AMR_SIG_438) {
/*
* the AMI 438 is a NetRaid 3si in
* HP-land
*/
product = "HP NetRaid 3si";
}
snprintf(firmware, sizeof(firmware),
"%c.%02d.%02d",
ae->ae_adapter.aa_firmware[2],
ae->ae_adapter.aa_firmware[1],
ae->ae_adapter.aa_firmware[0]);
snprintf(bios, sizeof(bios),
"%c.%02d.%02d",
ae->ae_adapter.aa_bios[2],
ae->ae_adapter.aa_bios[1],
ae->ae_adapter.aa_bios[0]);
} else {
snprintf(firmware, sizeof(firmware), "%.4s",
ae->ae_adapter.aa_firmware);
snprintf(bios, sizeof(bios), "%.4s",
ae->ae_adapter.aa_bios);
}
printf("Ioctl = %d (%s)\n", FIRMWARE_8LD, "8LD");
printf("Product =\t<%s>\n", product);
printf("Firmware =\t%s\n", firmware);
printf("BIOS =\t%s\n", bios);
/* printf ("SCSI Channels =\t%d\n", ae->ae_nschan); */
/* printf ("Fibre Loops =\t%d\n", ae->ae_fcloops); */
printf("Memory size =\t%d MB\n",
ae->ae_adapter.aa_memorysize);
/*
* printf ("Notify counters =\t%d\n",
* ae->ae_numnotifyctr) ;
*/
}
return FIRMWARE_8LD;
}
/*
* Neither firmware interface succeeded. Abort.
*/
fprintf(stderr, "Firmware interface not supported\n");
exit(1);
}
static char *
describe_property(uint8_t prop, char *buffer)
{
size_t i;
strcpy(buffer, "<");
for (i = 0; i < __arraycount(proptable); i++) {
if (i > 0)
strcat(buffer, ",");
if (prop & proptable[i].code)
strcat(buffer, proptable[i].ifyes);
else
strcat(buffer, proptable[i].ifno);
}
strcat(buffer, ">");
return buffer;
}
static const char *
describe_state(int verbosity, uint8_t state)
{
size_t i;
if ((AMR_DRV_PREVSTATE(state) == AMR_DRV_CURSTATE(state)) &&
(AMR_DRV_CURSTATE(state) == AMR_DRV_OFFLINE) && verbosity == 0)
return NULL;
for (i = 0; i < __arraycount(statetable); i++)
if (AMR_DRV_CURSTATE(state) == statetable[i].code)
return (statetable[i].status);
return NULL;
}
/******************************************************************************
* Battery status
*/
static void
describe_battery(int fd, int verbosity, int fwint, int bflags, int globalparam)
{
uint8_t batt_status;
size_t i;
if (fwint == FIRMWARE_40LD) {
enq_result = amr_ioctl_enquiry(fd, AMR_CMD_CONFIG,
AMR_CONFIG_ENQ3, AMR_CONFIG_ENQ3_SOLICITED_FULL);
if (enq_result == AMR_STATUS_SUCCESS) {
struct amr_enquiry3 *ae3;
ae3 = (struct amr_enquiry3 *)enq_buffer;
if (bflags || globalparam) {
batt_status = ae3->ae_batterystatus;
printf("Battery status\t\t");
for (i = 0; i < __arraycount(battable); i++) {
if (batt_status & battable[i].code)
printf("%s, ", battable[i].status);
}
if (!(batt_status &
(AMR_BATT_MODULE_MISSING|AMR_BATT_PACK_MISSING))) {
for (i = 0;
i < __arraycount(bcstatble); i++)
if (bcstatble[i].code ==
(batt_status & AMR_BATT_CHARGE_MASK))
printf("%s", bcstatble[i].status);
} else
printf("charge unknown");
if (verbosity)
printf(" (0x%02x)", batt_status);
printf("\n");
}
}
} else if (fwint == FIRMWARE_8LD) {
/* Nothing to do here. */
return;
} else {
fprintf(stderr, "Firmware interface not supported.\n");
exit(1);
}
return;
}
/******************************************************************************
* Logical volumes
*/
static void
describe_one_volume(int ldrv, int verbosity,
uint32_t size, uint8_t state, uint8_t prop)
{
float szgb;
int raid_level;
char propstr[MAXPATHLEN];
const char *statestr;
szgb = ((float)size) / (1024 * 1024 * 2); /* size in GB */
raid_level = prop & AMR_DRV_RAID_MASK;
printf("Logical volume %d\t", ldrv);
statestr = describe_state(verbosity, state);
if (statestr)
printf("%s ", statestr);
printf("(%.2f GB, RAID%d", szgb, raid_level);
if (verbosity >= 1) {
describe_property(prop, propstr);
printf(" %s", propstr);
}
printf(")\n");
}
/******************************************************************************
* Physical drives
*/
static void
describe_one_drive(int pdrv, int verbosity, uint8_t state)
{
const char *statestr;
statestr = describe_state(verbosity, state);
if (statestr) {
if (nschan > 0)
printf("Physical drive %d:%d\t%s\n",
pdrv / AMR_MAX_NSDEVS, pdrv % AMR_MAX_NSDEVS,
statestr);
else
printf("Physical drive %d:\t%s\n", pdrv, statestr);
}
}
static void
describe_drive(int verbosity, int fwint, int ldrv, int sbus, int sdev)
{
int drv, pdrv = -1;
if (sbus > -1 && sdev > -1)
pdrv = (sbus * AMR_MAX_NSDEVS) + sdev;
if (nschan != 0) {
if (sbus > -1 && sbus >= nschan) {
fprintf(stderr, "SCSI channel %d does not exist.\n", sbus);
exit(1);
} else if (sdev > -1 && sdev >= AMR_MAX_NSDEVS) {
fprintf(stderr, "SCSI device %d:%d does not exist.\n",
sbus, sdev);
exit(1);
}
}
if (fwint == FIRMWARE_40LD) {
if (enq_result == AMR_STATUS_SUCCESS) {
struct amr_enquiry3 *ae3;
ae3 = (struct amr_enquiry3 *)enq_buffer;
if ((ldrv < 0 && sbus < 0) || ldrv >= 0) {
if (ldrv >= ae3->ae_numldrives) {
fprintf(stderr, "Logical volume %d "
"does not exist.\n", ldrv);
exit(1);
}
if (ldrv < 0) {
for (drv = 0;
drv < ae3->ae_numldrives;
drv++)
describe_one_volume(drv,
verbosity,
ae3->ae_drivesize[drv],
ae3->ae_drivestate[drv],
ae3->ae_driveprop[drv]);
} else {
describe_one_volume(ldrv,
verbosity,
ae3->ae_drivesize[ldrv],
ae3->ae_drivestate[ldrv],
ae3->ae_driveprop[ldrv]);
}
}
if ((ldrv < 0 && sbus < 0) || sbus >= 0) {
if (pdrv >= AMR_40LD_MAXPHYSDRIVES ||
(nschan != 0 && pdrv >= (nschan * AMR_MAX_NSDEVS))) {
fprintf(stderr, "Physical drive %d "
"is out of range.\n", pdrv);
exit(1);
}
if (sbus < 0) {
for (drv = 0;
drv < AMR_40LD_MAXPHYSDRIVES;
drv++) {
if (nschan != 0 &&
drv >= (nschan * AMR_MAX_NSDEVS))
break;
describe_one_drive(drv,
verbosity,
ae3->ae_pdrivestate[drv]);
}
} else if (sdev < 0) {
for (drv = sbus * AMR_MAX_NSDEVS;
drv < ((sbus + 1) * AMR_MAX_NSDEVS);
drv++) {
if (nschan != 0 &&
drv >= (nschan * AMR_MAX_NSDEVS))
break;
describe_one_drive(drv,
verbosity,
ae3->ae_pdrivestate[drv]);
}
} else {
if (nschan != 0 &&
pdrv < (nschan * AMR_MAX_NSDEVS))
describe_one_drive(pdrv, 1,
ae3->ae_pdrivestate[pdrv]);
}
}
}
} else if (fwint == FIRMWARE_8LD) {
/* Nothing to do here. */
return;
} else {
fprintf(stderr, "Firmware interface not supported.\n");
exit(1);
}
}
/******************************************************************************
* Main function
*/
int
main(int argc, char *argv[])
{
int i;
int fd = -1;
int globalparam = 0, verbosity = 0;
int bflags = 0, fflags = 0, sflags = 0;
int lvolno = -1, physno = -1;
int sbusno = -1, targetno = -1;
char filename[MAXPATHLEN];
char sdev[MAXPATHLEN];
char *pdev;
extern char *optarg;
extern int optind;
/*
* Parse arguments
*/
if (argc < 2)
usage(argv[0]);
if (strcmp(argv[1], "stat") != 0) /* only stat implemented for now */
usage(argv[0]);
optind = 2;
while ((i = getopt(argc, argv, "a:b:f:gl:p:s:t:v")) != -1)
switch (i) {
case 'a':
nattempts = atoi(optarg);
break;
case 'b':
bflags++;
break;
case 'f':
snprintf(filename, MAXPATHLEN, "%s", optarg);
filename[MAXPATHLEN - 1] = '\0';
fflags++;
break;
case 'g':
globalparam = 1;
break;
case 'l':
lvolno = atoi(optarg);
break;
case 'p':
physno = atoi(optarg);
break;
case 's':
snprintf(sdev, MAXPATHLEN, "%s", optarg);
sdev[MAXPATHLEN - 1] = '\0';
sflags++;
break;
case 't':
sleeptime = atoi(optarg);
break;
case 'v':
verbosity++;
break;
case '?':
default:
usage(argv[0]);
}
argc -= optind;
argv += optind;
if (argc != 0)
usage(argv[0]);
if (!fflags) {
snprintf(filename, MAXPATHLEN, "/dev/amr0");
}
fd = open(filename, O_RDONLY);
if (fd == -1) {
err(EXIT_FAILURE, "open");
}
if (ioctl(fd, AMR_IO_VERSION, &i) == -1) {
err(EXIT_FAILURE, "ioctl version");
}
if (sflags) {
if(physno > -1)
usage(argv[0]);
else {
sbusno = atoi(sdev);
if ((pdev = index(sdev, ':')))
targetno = atoi(++pdev);
}
} else if (physno > -1) {
sbusno = physno / AMR_MAX_NSDEVS;
targetno = physno % AMR_MAX_NSDEVS;
}
if (globalparam && verbosity >= 1)
printf("Version\t\t\t%d\n", i);
#if 0
if (i != 1) {
fprintf(stderr, "Driver version (%d) not supported\n", i);
exit(1);
}
#endif
i = describe_card(fd, verbosity, globalparam);
describe_battery(fd, verbosity, i, bflags, globalparam);
if (!bflags || lvolno > -1 || physno > -1 || sbusno > -1 || targetno > -1)
describe_drive(verbosity, i, lvolno, sbusno, targetno);
return 0;
}
|