Use GT_RUNDIR for local sockets

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-03-14 07:06:25 +00:00
parent 66cdcf2ee3
commit b0a589b792
5 changed files with 9 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ gt_show_dev_status(int fd, const char *dev)
static int
gt_show_dev(const char *dev)
{
int fd = ctl_connect("/run/" PACKAGE_NAME, dev);
int fd = ctl_connect(GT_RUNDIR, dev);
if (fd == -1) {
perror(dev);
@@ -93,7 +93,7 @@ gt_show(int argc, char **argv)
return 0;
}
DIR *dp = opendir("/run/" PACKAGE_NAME);
DIR *dp = opendir(GT_RUNDIR);
if (!dp) {
if (errno == ENOENT)