diff --git a/guestfs-inspectd.c b/guestfs-inspectd.c index a627743..7d8c250 100644 --- a/guestfs-inspectd.c +++ b/guestfs-inspectd.c @@ -6,6 +6,8 @@ void *worker_task; +char *endpoint(void); + int main(int argc, char **argv) { if (argc < 2) { printf("Usage: %s ...\n", argv[0]); @@ -25,3 +27,11 @@ int main(int argc, char **argv) { return EXIT_SUCCESS; } + +char *endpoint() { + // TODO: This should be based on GUESTFS_INSPECT_ENDPOINT, or XDG_RUNTIME_DIR if the former is not set, and default to a sensible path if neither are set. + const char* ep = "ipc:///tmp/guestfs-inspect.sock"; + char *res = malloc(strlen(ep) + 1); + strcpy(res, ep); + return res; +}