daemon: Add flags argument to command*() functions.