]> xenbits.xensource.com Git - libvirt.git/commitdiff
virCommandPassFD: Give name to flags
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 21 Mar 2018 16:17:54 +0000 (17:17 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 22 Mar 2018 06:44:14 +0000 (07:44 +0100)
The flags passed to virCommandPassFD() are unnamed and
documentation to this function doesn't list them either.
Give them name and mention it in documentation to functions
using them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
src/util/vircommand.c
src/util/vircommand.h

index 17cbdab7b70cf01b645bca59f4824b0acca67757..8a319069fde64a4d0dee37eb3176cd016f065ab9 100644 (file)
@@ -173,9 +173,9 @@ virCommandFDIsSet(virCommandPtr cmd,
 
 /*
  * virCommandFDSet:
- * @fd: FD to be put into @set
- * @set: the set
- * @set_size: actual size of @set
+ * @cmd: pointer to virCommand
+ * @fd: file descriptor to pass
+ * @flags: extra flags; binary-OR of virCommandPassFDFlags
  *
  * This is practically generalized implementation
  * of FD_SET() as we do not want to be limited
@@ -976,7 +976,7 @@ virCommandNewVAList(const char *binary, va_list list)
  * virCommandPassFD:
  * @cmd: the command to modify
  * @fd: fd to reassign to the child
- * @flags: the flags
+ * @flags: extra flags; binary-OR of virCommandPassFDFlags
  *
  * Transfer the specified file descriptor to the child, instead
  * of closing it on exec. @fd must not be one of the three
index d59278cf5f6cd7b829edc1841dc6d976a5146c67..883e212959978d21c8867039f5bdd9433153ebdc 100644 (file)
@@ -51,10 +51,10 @@ virCommandPtr virCommandNewVAList(const char *binary, va_list list)
  * delayed until the Run/RunAsync methods
  */
 
-enum {
+typedef enum {
     /* Close the FD in the parent */
     VIR_COMMAND_PASS_FD_CLOSE_PARENT = (1 << 0),
-};
+} virCommandPassFDFlags;
 
 void virCommandPassFD(virCommandPtr cmd,
                       int fd,