mirror of
https://github.com/ProDOS-8/xHD.git
synced 2026-04-21 01:16:39 +00:00
Added check for at least one valid port.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <libserialport.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -161,6 +162,12 @@ int main(void)
|
||||
sp_free_port_list(ports);
|
||||
}
|
||||
|
||||
if (iValidPortCount == 0)
|
||||
{
|
||||
printf("Err: No valid port\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// TODO: Add server shutdown
|
||||
while (1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user