Expose function to test if a serial is TCP/IP
In practice, it just tests if the serial contains a ':', which is sufficient to distinguish ip:port from a real USB serial.
This commit is contained in:
@@ -482,3 +482,8 @@ sc_adb_get_device_ip(struct sc_intr *intr, const char *serial, unsigned flags) {
|
||||
|
||||
return sc_adb_parse_device_ip_from_output(buf);
|
||||
}
|
||||
|
||||
bool
|
||||
sc_adb_is_serial_tcpip(const char *serial) {
|
||||
return strchr(serial, ':');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user