Attention is currently required from: Stefan Reinauer, Angel Pons. Xiang Wang has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49254 )
Change subject: sysfsgpio.c implement spi interface via linux sysfs ......................................................................
Patch Set 13:
(2 comments)
File sysfsgpio.c:
https://review.coreboot.org/c/flashrom/+/49254/comment/79386348_2c5fbab6 PS4, Line 99: snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/direction", desc->pin); : desc->fd_direction = open(s, O_WRONLY); : if (desc->fd_direction < 0) { : msg_perr("Error: failed to open %s\n", s); : return -1; : } : : snprintf(s, sizeof(s), "/sys/class/gpio/gpio%s/value", desc->pin); : desc->fd_value = open(s, O_RDONLY); : if (desc->fd_value < 0) { : msg_perr("Error: failed to open %s\n", s); : return -1; : }
I want to know why not use snprintf. The changes you hope will make the code messier.
Done
https://review.coreboot.org/c/flashrom/+/49254/comment/c6f7d162_c37a7d4c PS4, Line 204: static int parse_pins(struct sysfsgpio_pins *pins)
if (v < 0 || v > 9999999) […]
Done