]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: remove virCommandPassFDGetFDIndex()
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 13 May 2022 18:33:56 +0000 (13:33 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Mon, 16 May 2022 14:29:47 +0000 (09:29 -0500)
commit f9236200 removed the last use of this function, so it can be
dropped.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/libvirt_private.syms
src/util/vircommand.c
src/util/vircommand.h

index 93092597516f00908bc89696be6e35c7d193616e..66f73e84aa68142076a0b4a1cfdc68d909567b97 100644 (file)
@@ -2057,7 +2057,6 @@ virCommandNewArgs;
 virCommandNewVAList;
 virCommandNonblockingFDs;
 virCommandPassFD;
-virCommandPassFDGetFDIndex;
 virCommandPassFDIndex;
 virCommandRawStatus;
 virCommandRequireHandshake;
index 41cf552d7b85a60337dbf5a0a858567711548bf6..f3c26a2673c4d4c3210f893d56813d9ff04a360f 100644 (file)
@@ -1077,33 +1077,6 @@ virCommandPassFD(virCommand *cmd, int fd, unsigned int flags)
     virCommandPassFDIndex(cmd, fd, flags, NULL);
 }
 
-/*
- * virCommandPassFDGetFDIndex:
- * @cmd: pointer to virCommand
- * @fd: FD to get index of
- *
- * Determine the index of the FD in the transfer set.
- *
- * Returns index >= 0 if @set contains @fd,
- * -1 otherwise.
- */
-int
-virCommandPassFDGetFDIndex(virCommand *cmd, int fd)
-{
-    size_t i = 0;
-
-    if (virCommandHasError(cmd))
-        return -1;
-
-    while (i < cmd->npassfd) {
-        if (cmd->passfd[i].fd == fd)
-            return i;
-        i++;
-    }
-
-    return -1;
-}
-
 /**
  * virCommandSetPidFile:
  * @cmd: the command to modify
index 600806a987def226e021f445ee3260b2b2a5a9cf..c534a9bb1646df70f26bb97919d8b35a53c41f03 100644 (file)
@@ -61,9 +61,6 @@ void virCommandPassFDIndex(virCommand *cmd,
                            unsigned int flags,
                            size_t *idx) G_GNUC_NO_INLINE;
 
-int virCommandPassFDGetFDIndex(virCommand *cmd,
-                               int fd);
-
 void virCommandSetPidFile(virCommand *cmd,
                           const char *pidfile) ATTRIBUTE_NONNULL(2);