diff options
Diffstat (limited to 'plugins/runcmd.c')
-rw-r--r-- | plugins/runcmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c index a7155d27..8919a9fb 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c | |||
@@ -71,7 +71,7 @@ static pid_t *np_pids = NULL; | |||
71 | static int np_runcmd_open(const char *, int *, int *) | 71 | static int np_runcmd_open(const char *, int *, int *) |
72 | __attribute__((__nonnull__(1, 2, 3))); | 72 | __attribute__((__nonnull__(1, 2, 3))); |
73 | 73 | ||
74 | static int np_fetch_output(int, output *, int) | 74 | static int np_fetch_output(int, cmd_output *, int) |
75 | __attribute__((__nonnull__(2))); | 75 | __attribute__((__nonnull__(2))); |
76 | 76 | ||
77 | static int np_runcmd_close(int); | 77 | static int np_runcmd_close(int); |
@@ -253,7 +253,7 @@ runcmd_timeout_alarm_handler (int signo) | |||
253 | 253 | ||
254 | 254 | ||
255 | static int | 255 | static int |
256 | np_fetch_output(int fd, output *op, int flags) | 256 | np_fetch_output(int fd, cmd_output *op, int flags) |
257 | { | 257 | { |
258 | size_t len = 0, i = 0, lineno = 0; | 258 | size_t len = 0, i = 0, lineno = 0; |
259 | size_t rsf = 6, ary_size = 0; /* rsf = right shift factor, dec'ed uncond once */ | 259 | size_t rsf = 6, ary_size = 0; /* rsf = right shift factor, dec'ed uncond once */ |
@@ -322,13 +322,13 @@ np_fetch_output(int fd, output *op, int flags) | |||
322 | 322 | ||
323 | 323 | ||
324 | int | 324 | int |
325 | np_runcmd(const char *cmd, output *out, output *err, int flags) | 325 | np_runcmd(const char *cmd, cmd_output *out, cmd_output *err, int flags) |
326 | { | 326 | { |
327 | int fd, pfd_out[2], pfd_err[2]; | 327 | int fd, pfd_out[2], pfd_err[2]; |
328 | 328 | ||
329 | /* initialize the structs */ | 329 | /* initialize the structs */ |
330 | if(out) memset(out, 0, sizeof(output)); | 330 | if(out) memset(out, 0, sizeof(cmd_output)); |
331 | if(err) memset(err, 0, sizeof(output)); | 331 | if(err) memset(err, 0, sizeof(cmd_output)); |
332 | 332 | ||
333 | if((fd = np_runcmd_open(cmd, pfd_out, pfd_err)) == -1) | 333 | if((fd = np_runcmd_open(cmd, pfd_out, pfd_err)) == -1) |
334 | die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd); | 334 | die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd); |