move set_nonblock, create_socket and path_exists to libi3

This commit is contained in:
Michael Stapelberg
2021-01-15 14:48:10 +01:00
committed by Michael Stapelberg
parent e4f12ac349
commit 131a6158c8
8 changed files with 139 additions and 76 deletions

View File

@ -11,15 +11,6 @@
#include <string.h>
#include <sys/stat.h>
/*
* Checks if the given path exists by calling stat().
*
*/
static bool path_exists(const char *path) {
struct stat buf;
return (stat(path, &buf) == 0);
}
/*
* Get the path of the first configuration file found. If override_configpath is
* specified, that path is returned and saved for further calls. Otherwise,