Compare commits

..

1 Commits

Author SHA1 Message Date
Rikus Wessels 114d1f3561
Merge 71e8c16178 into 7fb81e6779 2025-03-12 10:50:50 +01:00
1 changed files with 2 additions and 7 deletions

View File

@ -370,13 +370,8 @@ int main(int argc, char *argv[])
/* retrieve the name of the created CAN netdevice */
if (ioctl(fd, SIOCGIFNAME, ifr.ifr_name) < 0) {
if (name) {
perror("ioctl SIOCGIFNAME");
exit(EXIT_FAILURE);
} else {
/* Graceful degradation: we only needed the name for display. */
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "<unknown>");
}
perror("ioctl SIOCGIFNAME");
exit(EXIT_FAILURE);
}
syslogger(LOG_NOTICE, "attached TTY %s to netdevice %s\n", ttypath, ifr.ifr_name);