Check the <channel> arg a bit more.
Submitted by: David Malone <dwmalone@maths.tcd.ie>
This commit is contained in:
parent
c5f14263c0
commit
c75ece6633
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92003
@ -68,8 +68,10 @@ subsystem.
|
||||
can cause severe system crashes and loss of data if used improperly, please
|
||||
exercise caution when using this command!
|
||||
.Pp
|
||||
.Nm
|
||||
supports the following commands:
|
||||
The
|
||||
.Ar channel
|
||||
argument is the number of the ata channel on which to operate.
|
||||
The following commands are supported:
|
||||
.Bl -tag -width "attach"
|
||||
.It Ic attach
|
||||
Attach an ATA
|
||||
@ -122,7 +124,7 @@ Show info about all attached devices on all active controllers.
|
||||
The
|
||||
.Nm
|
||||
utility first appeared in
|
||||
.Fx 5.0 .
|
||||
.Fx 4.6 .
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
The
|
||||
|
@ -242,8 +242,13 @@ main(int argc, char **argv)
|
||||
|
||||
bzero(&iocmd, sizeof(struct ata_cmd));
|
||||
|
||||
if (argc > 2)
|
||||
iocmd.channel = atoi(argv[2]);
|
||||
if (argc > 2) {
|
||||
int chan;
|
||||
if (!(sscanf(argv[2], "%d", &chan) == 1 ||
|
||||
sscanf(argv[2], "ata%d", &chan) == 1))
|
||||
usage();
|
||||
iocmd.channel = chan;
|
||||
}
|
||||
|
||||
if (argc > 3)
|
||||
master = atoi(argv[3]);
|
||||
|
Loading…
Reference in New Issue
Block a user