util: remove virCommandPassFDGetFDIndex()

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>
This commit is contained in:
Jonathon Jongsma 2022-05-13 13:33:56 -05:00
parent b6705cdefb
commit 2e89805894
3 changed files with 0 additions and 31 deletions

View File

@ -2057,7 +2057,6 @@ virCommandNewArgs;
virCommandNewVAList;
virCommandNonblockingFDs;
virCommandPassFD;
virCommandPassFDGetFDIndex;
virCommandPassFDIndex;
virCommandRawStatus;
virCommandRequireHandshake;

View 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

View 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);