diff options
| author | Roy Marples <roy@marples.name> | 2009-01-13 18:03:12 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-01-13 18:03:12 +0000 |
| commit | bd487e6c771dac18b2a2b8b62c5127b09f57b002 (patch) | |
| tree | 166260de8caa886f71995c285400abe476505114 /dhcpcd.c | |
| parent | f6ec8e1146094000d1418246be2a1576b57b99f9 (diff) | |
| download | dhcpcd-bd487e6c771dac18b2a2b8b62c5127b09f57b002.tar.xz | |
Send version length first on the control socket.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1115,7 +1115,12 @@ handle_args(struct fd_list *fd, int argc, char **argv) if (fd != NULL) { /* Special commands for our control socket */ if (strcmp(*argv, "--version") == 0) { - write(fd->fd, VERSION, strlen(VERSION)); + l = strlen(VERSION); + iov[0].iov_base = &l; + iov[0].iov_len = sizeof(ssize_t); + iov[1].iov_base = UNCONST(VERSION); + iov[1].iov_len = l; + writev(fd->fd, iov, 2); return 0; } else if (strcmp(*argv, "--getinterfaces") == 0) { l = 0; |
