mirror of https://github.com/ProDOS-8/xHD.git
Added check for at least one valid port.
This commit is contained in:
parent
8d7fe0bd12
commit
21dbb3da3d
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue