]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: file: Remove virFileReadLink
authorPeter Krempa <pkrempa@redhat.com>
Wed, 13 Nov 2019 11:49:24 +0000 (12:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 14 Nov 2019 11:42:09 +0000 (12:42 +0100)
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>
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h

index 4d0d03c580f8b8257b1500b01de8f983e6c5c685..c706553e37a8cb7be755fbdcfab5381b0430632b 100644 (file)
@@ -1978,7 +1978,6 @@ virFileReadBufQuiet;
 virFileReadHeaderFD;
 virFileReadHeaderQuiet;
 virFileReadLimFD;
-virFileReadLink;
 virFileReadValueBitmap;
 virFileReadValueInt;
 virFileReadValueScaledInt;
index ced0ea70b79e02289a99f059b676ca7c354ae8df..b1aeaa585157d6e5af6ccf8dca58aba938ff26c2 100644 (file)
@@ -81,7 +81,6 @@
 #include "virutil.h"
 
 #include "c-ctype.h"
-#include "areadlink.h"
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
@@ -1625,18 +1624,6 @@ virFileIsLink(const char *linkpath)
     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.:
  * "qemu-img" will return "/usr/bin/qemu-img"
index a570529330957b8b371c23b424f344a6d5d2fc55..9a8709b52ca4974293be04336edba5266ca1ec40 100644 (file)
@@ -176,9 +176,6 @@ int virFileResolveAllLinks(const char *linkpath,
 int virFileIsLink(const char *linkpath)
     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 *virFileFindResource(const char *filename,