Skip to content

Commit

Permalink
libticables: relax the checks on TTY serial ports, in an attempt to h…
Browse files Browse the repository at this point in the history
…elp usage of libticables with some USB/RS232 adapters, though most do not work for the purposes of TI's protocol. Reported by "jdudejoe" as issue debrouxl#53 .

Signed-off-by: Lionel Debroux <[email protected]>
  • Loading branch information
debrouxl committed Mar 1, 2022
1 parent 30534e3 commit cd2abc1
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 22 deletions.
22 changes: 17 additions & 5 deletions libticables/trunk/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libticables2 1.3.6\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-10-12 18:05+0200\n"
"POT-Creation-Date: 2021-07-10 17:40+0200\n"
"PO-Revision-Date: 2019-10-29 13:55+0100\n"
"Last-Translator: Andreas B. Mundt <[email protected]>\n"
"Language-Team: <[email protected]>\n"
Expand Down Expand Up @@ -105,7 +105,7 @@ msgstr " TTY-Unterstützung: verfügbar."
msgid "Check for tty usability:"
msgstr "Prüfe TTY-Verfügbarkeit:"

#: src/bsd/detect.cc:277 src/linux/detect.cc:346 src/linux/detect.cc:386
#: src/bsd/detect.cc:277 src/linux/detect.cc:339 src/linux/detect.cc:386
msgid " is usable: yes"
msgstr " benutzbar: ja"

Expand Down Expand Up @@ -445,9 +445,17 @@ msgstr "kann serielles Gerät '%s' nicht nutzen"
msgid "Error running TIOCGSERIAL ioctl on device %s - %s"
msgstr "Fehler TIOCGSERIAL-Ioctl auf Gerät %s - %s auszuführen"

#: src/linux/detect.cc:341 src/linux/detect.cc:381
msgid " is usable: no"
msgstr " ist benutzbar: nein"
#: src/linux/detect.cc:335 src/linux/detect.cc:343
msgid ""
"NOTE: proceeding nevertheless, in an attempt to help usage of libticables "
"with some USB/RS232 adapters, though most do not work at all for the "
"purposes of TI's protocol"
msgstr ""

#: src/linux/detect.cc:342
#, c-format
msgid "Serial port has unknown type %d"
msgstr ""

#: src/linux/detect.cc:357
msgid "Check for parport support:"
Expand All @@ -465,6 +473,10 @@ msgstr " parport-Unterstützung: nicht kompiliert."
msgid "Check for parport usability:"
msgstr "Prüfe parport-Verfügbarkeit:"

#: src/linux/detect.cc:381
msgid " is usable: no"
msgstr " ist benutzbar: nein"

#: src/linux/detect.cc:412
msgid "Check for libusb usability:"
msgstr "Prüfe Verfügbarkeit von libusb:"
Expand Down
25 changes: 20 additions & 5 deletions libticables/trunk/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libticables2 1.3.6\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-10-12 18:05+0200\n"
"POT-Creation-Date: 2021-07-10 17:40+0200\n"
"PO-Revision-Date: 2011-12-13 19:16+0100\n"
"Last-Translator: Lionel Debroux <[email protected]>\n"
"Language-Team: Français <[email protected]>\n"
Expand Down Expand Up @@ -108,7 +108,7 @@ msgstr " support tty: disponible."
msgid "Check for tty usability:"
msgstr "Vérification de l'utilisabilité du tty:"

#: src/bsd/detect.cc:277 src/linux/detect.cc:346 src/linux/detect.cc:386
#: src/bsd/detect.cc:277 src/linux/detect.cc:339 src/linux/detect.cc:386
msgid " is usable: yes"
msgstr " est utilisable: oui"

Expand Down Expand Up @@ -445,9 +445,20 @@ msgid "Error running TIOCGSERIAL ioctl on device %s - %s"
msgstr ""
"Erreur lors de l'exécution de l'ioctl TIOCGSERIAL sur le périphérique %s - %s"

#: src/linux/detect.cc:341 src/linux/detect.cc:381
msgid " is usable: no"
msgstr " est utilisable: non"
#: src/linux/detect.cc:335 src/linux/detect.cc:343
msgid ""
"NOTE: proceeding nevertheless, in an attempt to help usage of libticables "
"with some USB/RS232 adapters, though most do not work at all for the "
"purposes of TI's protocol"
msgstr ""
"NOTE: on poursuit quand même, pour tenter d'aider à l'utilisation de "
"libticables avec certains adaptateurs USB/RS232, bien que la plupart ne "
"fonctionnent pas du tout pour l'utilisation du protocole de TI"

#: src/linux/detect.cc:342
#, c-format
msgid "Serial port has unknown type %d"
msgstr "Le port série a le type inconnu %d"

#: src/linux/detect.cc:357
msgid "Check for parport support:"
Expand All @@ -465,6 +476,10 @@ msgstr " support parport: pas compilé."
msgid "Check for parport usability:"
msgstr "Vérification de l'utilisabilité du port parallèle:"

#: src/linux/detect.cc:381
msgid " is usable: no"
msgstr " est utilisable: non"

#: src/linux/detect.cc:412
msgid "Check for libusb usability:"
msgstr "Vérification de l'utilisabilité de libusb:"
Expand Down
20 changes: 16 additions & 4 deletions libticables/trunk/po/libticables2.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libticables2 1.3.6\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-10-12 18:05+0200\n"
"POT-Creation-Date: 2021-07-10 17:40+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -103,7 +103,7 @@ msgstr ""
msgid "Check for tty usability:"
msgstr ""

#: src/bsd/detect.cc:277 src/linux/detect.cc:346 src/linux/detect.cc:386
#: src/bsd/detect.cc:277 src/linux/detect.cc:339 src/linux/detect.cc:386
msgid " is usable: yes"
msgstr ""

Expand Down Expand Up @@ -394,8 +394,16 @@ msgstr ""
msgid "Error running TIOCGSERIAL ioctl on device %s - %s"
msgstr ""

#: src/linux/detect.cc:341 src/linux/detect.cc:381
msgid " is usable: no"
#: src/linux/detect.cc:335 src/linux/detect.cc:343
msgid ""
"NOTE: proceeding nevertheless, in an attempt to help usage of libticables "
"with some USB/RS232 adapters, though most do not work at all for the "
"purposes of TI's protocol"
msgstr ""

#: src/linux/detect.cc:342
#, c-format
msgid "Serial port has unknown type %d"
msgstr ""

#: src/linux/detect.cc:357
Expand All @@ -414,6 +422,10 @@ msgstr ""
msgid "Check for parport usability:"
msgstr ""

#: src/linux/detect.cc:381
msgid " is usable: no"
msgstr ""

#: src/linux/detect.cc:412
msgid "Check for libusb usability:"
msgstr ""
Expand Down
16 changes: 8 additions & 8 deletions libticables/trunk/src/linux/detect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,18 +332,18 @@ int linux_check_tty(const char *devname)
if (ioctl(fd, TIOCGSERIAL, &serinfo) < 0)
{
ticables_warning(_("Error running TIOCGSERIAL ioctl on device %s - %s"), devname, strerror(errno));
close(fd);
return ERR_TTDEV;
ticables_warning("%s", _("NOTE: proceeding nevertheless, in an attempt to help usage of libticables with some USB/RS232 adapters, though most do not work at all for the purposes of TI's protocol"));
}

if(serinfo.type == PORT_UNKNOWN || serinfo.type == PORT_MAX)
else
{
ticables_info("%s", _(" is usable: no"));
close(fd);
return ERR_TTDEV;
ticables_info("%s", _(" is usable: yes"));
if (serinfo.type == PORT_UNKNOWN || serinfo.type == PORT_MAX)
{
ticables_warning(_("Serial port has unknown type %d"), serinfo.type);
ticables_warning("%s", _("NOTE: proceeding nevertheless, in an attempt to help usage of libticables with some USB/RS232 adapters, though most do not work at all for the purposes of TI's protocol"));
}
}

ticables_info("%s", _(" is usable: yes"));
close(fd);
#endif

Expand Down

0 comments on commit cd2abc1

Please sign in to comment.