Writes out a space and then an option (or other string) with an optional "=" + arg suffix. */
| 191 | |
| 192 | /* Writes out a space and then an option (or other string) with an optional "=" + arg suffix. */ |
| 193 | static int write_opt(const char *opt, const char *arg) |
| 194 | { |
| 195 | int len = strlen(opt); |
| 196 | int err = write(batch_sh_fd, " ", 1) != 1; |
| 197 | err = write(batch_sh_fd, opt, len) != len ? 1 : 0; |
| 198 | if (arg) { |
| 199 | err |= write(batch_sh_fd, "=", 1) != 1; |
| 200 | err |= write_arg(arg); |
| 201 | } |
| 202 | return err; |
| 203 | } |
| 204 | |
| 205 | static void write_filter_rules(int fd) |
| 206 | { |
no test coverage detected