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

@ -1,3 +1,9 @@
2021-11-27 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Alex Sverdlin:
patch #10029: linuxspi: Report GPIO_GET_LINEHANDLE_IOCTL errors
* linuxspi.c (linuxspi_open): Report ioctl error
2021-11-27 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
Submitted by Alex Sverdlin:

1
NEWS
View File

@ -119,6 +119,7 @@ Current:
patch #9328: ft245r.c: add TPI support (patches 5-7)
patch #10027: linuxspi: Add reset pulse, according to AVR programming algorithm
patch #10028: linuxspi: close() only when necessary
patch #10029: linuxspi: Report GPIO_GET_LINEHANDLE_IOCTL errors
* Internals:
- New avrdude.conf keyword "family_id", used to verify SIB attributes

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;
}