mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
Fix status to report status from the given array.
This commit is contained in:
parent
06de1cd371
commit
3ea7aedd41
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148730
@ -477,7 +477,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (!(sscanf(argv[2], "ar%d", &array) == 1)) {
|
||||
fprintf(stderr,
|
||||
"atacontrol: Invalid array %s\n", argv[3]);
|
||||
"atacontrol: Invalid array %s\n", argv[2]);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (ioctl(fd, IOCATARAIDDELETE, &array) < 0)
|
||||
@ -489,7 +489,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (!(sscanf(argv[2], "ar%d", &config.lun) == 1)) {
|
||||
fprintf(stderr,
|
||||
"atacontrol: Invalid array %s\n", argv[3]);
|
||||
"atacontrol: Invalid array %s\n", argv[2]);
|
||||
usage();
|
||||
}
|
||||
if (!(sscanf(argv[3], "ad%d", &config.disks[0]) == 1)) {
|
||||
@ -506,7 +506,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (!(sscanf(argv[2], "ar%d", &array) == 1)) {
|
||||
fprintf(stderr,
|
||||
"atacontrol: Invalid array %s\n", argv[3]);
|
||||
"atacontrol: Invalid array %s\n", argv[2]);
|
||||
usage();
|
||||
}
|
||||
if (ioctl(fd, IOCATARAIDREBUILD, &array) < 0)
|
||||
@ -525,6 +525,11 @@ main(int argc, char **argv)
|
||||
struct ata_ioc_raid_config config;
|
||||
int i;
|
||||
|
||||
if (!(sscanf(argv[2], "ar%d", &config.lun) == 1)) {
|
||||
fprintf(stderr,
|
||||
"atacontrol: Invalid array %s\n", argv[2]);
|
||||
usage();
|
||||
}
|
||||
if (ioctl(fd, IOCATARAIDSTATUS, &config) < 0)
|
||||
err(1, "ioctl(IOCATARAIDSTATUS)");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user