]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/functions/functions.serial
Add "network device list" command
[people/stevee/network.git] / src / functions / functions.serial
index aaa3e4eac2b347ed382b79f223e125a867574285..170305b300761d2e1def4b9445ae940cd8bb6bf6 100644 (file)
 # This is a list of baudrates that are supported.
 SERIAL_BAUDRATES="921600 460800 230400 115200 57600 38400 19200 9600"
 
+function serial_list() {
+       local device
+       for device in /dev/ttyUSB*; do
+               if serial_exists "${device}"; then
+                       echo "${device}"
+               fi
+       done
+}
+
 function serial_exists() {
        local device=${1}