patch #10029: linuxspi: Report GPIO_GET_LINEHANDLE_IOCTL errors

Submitted by Alex Sverdlin:
* linuxspi.c (linuxspi_open): Report ioctl error




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1493 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2021-11-27 15:46:10 +00:00
parent d208503911
commit 6f183d427c
3 changed files with 9 additions and 0 deletions

View File

@@ -170,6 +170,8 @@ static int linuxspi_open(PROGRAMMER *pgm, char *port)
ret = ioctl(fd_gpiochip, GPIO_GET_LINEHANDLE_IOCTL, &req);
if (ret == -1) {
ret = -errno;
avrdude_message(MSG_INFO, "%s error: Unable to get GPIO line %d\n",
progname, pgm->pinno[PIN_AVR_RESET] & ~PIN_INVERSE);
goto close_gpiochip;
}