+ sprintf(p, "%i", priority);
+ r = exec_command_append(s->control_command, "-p", p, NULL);
+ if (r < 0)
+ goto fail;
+ }
+
+ if (discard && !streq(discard, "none")) {
+ const char *discard_arg;
+
+ if (streq(discard, "all"))
+ discard_arg = "--discard";
+ else
+ discard_arg = strappenda("--discard=", discard);
+
+ r = exec_command_append(s->control_command, discard_arg, NULL);
+ if (r < 0)
+ goto fail;
+ }
+
+ r = exec_command_append(s->control_command, s->what, NULL);