1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

search only for the substring "Server is listening"

because the complete line includes also the boot time
This commit is contained in:
Stefan Lankes 2016-11-13 23:13:23 +01:00
parent 78e59f62f7
commit 75c126fc4b

View file

@ -210,7 +210,7 @@ static int is_hermit_available(void)
return 0;
while(getline(&line, &n, file) > 0) {
if (strncmp(line, "TCP server is listening.\n", 2048) == 0) {
if (strstr(line, "TCP server is listening.") != NULL) {
ret = 1;
break;
}