1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

util: file: Remove virFileReadLink

The function is unused so we can remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-11-13 12:49:24 +01:00
parent 794c9ec535
commit 1900936fe6
3 changed files with 0 additions and 17 deletions

View File

@ -1978,7 +1978,6 @@ virFileReadBufQuiet;
virFileReadHeaderFD; virFileReadHeaderFD;
virFileReadHeaderQuiet; virFileReadHeaderQuiet;
virFileReadLimFD; virFileReadLimFD;
virFileReadLink;
virFileReadValueBitmap; virFileReadValueBitmap;
virFileReadValueInt; virFileReadValueInt;
virFileReadValueScaledInt; virFileReadValueScaledInt;

View File

@ -81,7 +81,6 @@
#include "virutil.h" #include "virutil.h"
#include "c-ctype.h" #include "c-ctype.h"
#include "areadlink.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
@ -1625,18 +1624,6 @@ virFileIsLink(const char *linkpath)
return S_ISLNK(st.st_mode) != 0; return S_ISLNK(st.st_mode) != 0;
} }
/*
* Read where symlink is pointing to.
*
* Returns 0 on success (@linkpath is a successfully read link),
* -1 with errno set upon error.
*/
int
virFileReadLink(const char *linkpath, char **resultpath)
{
return (*resultpath = areadlink(linkpath)) ? 0 : -1;
}
/* /*
* Finds a requested executable file in the PATH env. e.g.: * Finds a requested executable file in the PATH env. e.g.:
* "qemu-img" will return "/usr/bin/qemu-img" * "qemu-img" will return "/usr/bin/qemu-img"

View File

@ -176,9 +176,6 @@ int virFileResolveAllLinks(const char *linkpath,
int virFileIsLink(const char *linkpath) int virFileIsLink(const char *linkpath)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virFileReadLink(const char *linkpath, char **resultpath)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
char *virFindFileInPath(const char *file); char *virFindFileInPath(const char *file);
char *virFileFindResource(const char *filename, char *virFileFindResource(const char *filename,