mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix redundant output on macOS
This commit is contained in:
parent
cce94b9d92
commit
3af4c5591e
1 changed files with 0 additions and 20 deletions
20
src/tty.c
20
src/tty.c
|
|
@ -2068,32 +2068,12 @@ GList *tty_search_for_serial_devices(void)
|
|||
/* Check if device list is empty */
|
||||
if (!device_list)
|
||||
{
|
||||
tio_error_print("No serial devices found");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Sort device list by uptime */
|
||||
device_list = g_list_sort(device_list, compare_uptime);
|
||||
|
||||
/* Print header for device listing */
|
||||
print_padded("Device", listing_device_name_length_max, ' ');
|
||||
printf(" TID Uptime [s] Driver Description\n");
|
||||
print_padded("", listing_device_name_length_max, '-');
|
||||
printf(" ---- -------------- ---------------- --------------------------\n");
|
||||
|
||||
/* Print sorted device list */
|
||||
for (GList *l = device_list; l; l = l->next)
|
||||
{
|
||||
device_t *dev = l->data;
|
||||
printf("%-*s %-4s %14.3f %-16s %s\n",
|
||||
(int)listing_device_name_length_max, dev->path,
|
||||
dev->tid ?: "",
|
||||
dev->uptime,
|
||||
dev->driver ?: "",
|
||||
dev->description ?: "");
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return device_list;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue