qdl: fix error message referring to ttyUSB1

Since it is by no means certain that the current tty is ttyUSB1,
do not assume it to be so.

Unfortunately we do not know the current tty in main().
It would be possible to refactor the code so that we could print
the current tty, but since the only consumer of that information
would be this error message, that refactoring seems unjustified.

Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Niklas Cassel
2018-06-01 13:36:05 +02:00
committed by Bjorn Andersson
parent 37edf318b2
commit 5fc4cdbba4

2
qdl.c
View File

@@ -308,7 +308,7 @@ int main(int argc, char **argv)
out:
ret = tcsetattr(fd, TCSANOW, &tios);
if (ret < 0)
warn("unable to restore tios of ttyUSB1");
warn("unable to restore tios");
close(fd);
return 0;