commit f9236200 removed the last use of this function, so it can be dropped. Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/libvirt_private.syms | 1 - src/util/vircommand.c | 27 --------------------------- src/util/vircommand.h | 3 --- 3 files changed, 31 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9309259751..66f73e84aa 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2057,7 +2057,6 @@ virCommandNewArgs; virCommandNewVAList; virCommandNonblockingFDs; virCommandPassFD; -virCommandPassFDGetFDIndex; virCommandPassFDIndex; virCommandRawStatus; virCommandRequireHandshake; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 41cf552d7b..f3c26a2673 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -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 diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 600806a987..c534a9bb16 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -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); -- 2.35.3