diff options
| author | Roy Marples <roy@marples.name> | 2009-02-13 15:39:34 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-02-13 15:39:34 +0000 |
| commit | 3c3f38c09021f2b82a3823f35edd2d4cb2d1fb7e (patch) | |
| tree | 8ac806d02090587543855f827b28bd752c78c731 /dhcpcd.c | |
| parent | 35456091989ef70c3b5285d2c27867bc578639f3 (diff) | |
| download | dhcpcd-3c3f38c09021f2b82a3823f35edd2d4cb2d1fb7e.tar.xz | |
Allow socket to report location of the configuration file.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) { |
