From: Roy Marples Date: Fri, 13 Feb 2009 15:39:34 +0000 (+0000) Subject: Allow socket to report location of the configuration file. X-Git-Tag: v5.0.0~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c3f38c09021f2b82a3823f35edd2d4cb2d1fb7e;p=thirdparty%2Fdhcpcd.git Allow socket to report location of the configuration file. --- diff --git a/dhcpcd.c b/dhcpcd.c index 4d9daa2d..21612bdb 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -1129,6 +1129,14 @@ handle_args(struct fd_list *fd, int argc, char **argv) iov[1].iov_len = len; writev(fd->fd, iov, 2); return 0; + } else if (strcmp(*argv, "--getconfigfile") == 0) { + len = strlen(cffile ? cffile : CONFIG) + 1; + iov[0].iov_base = &len; + iov[0].iov_len = sizeof(ssize_t); + iov[1].iov_base = cffile ? cffile : UNCONST(CONFIG); + iov[1].iov_len = len; + writev(fd->fd, iov, 2); + return 0; } else if (strcmp(*argv, "--getinterfaces") == 0) { len = 0; if (argc == 1) {