]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: Remove virFileIsAbsPath()
authorFabiano Fidêncio <fidencio@redhat.com>
Wed, 18 Dec 2019 19:43:25 +0000 (20:43 +0100)
committerFabiano Fidêncio <fidencio@redhat.com>
Wed, 18 Dec 2019 22:11:50 +0000 (23:11 +0100)
The function is no longer used since commit faf2d811f3e9a4.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h

index 797c15bb42ab6f3f1020568caa9734fd93f15d72..a7b1ef23bcb654e9b5acc17b82a99e3f3b9ee144 100644 (file)
@@ -1994,7 +1994,6 @@ virFileGetMountSubtree;
 virFileGetXAttr;
 virFileGetXAttrQuiet;
 virFileInData;
-virFileIsAbsPath;
 virFileIsCDROM;
 virFileIsDir;
 virFileIsExecutable;
index 624bd9e3d02541430301b480f27a64a0b857ec08..b72d18b3d2e9447c43ac58dc822b57df4ad46574 100644 (file)
@@ -3178,25 +3178,6 @@ virFileOpenTty(int *ttymaster G_GNUC_UNUSED,
 }
 #endif /* WIN32 */
 
-bool
-virFileIsAbsPath(const char *path)
-{
-    if (!path)
-        return false;
-
-    if (VIR_FILE_IS_DIR_SEPARATOR(path[0]))
-        return true;
-
-#ifdef WIN32
-    if (g_ascii_isalpha(path[0]) &&
-        path[1] == ':' &&
-        VIR_FILE_IS_DIR_SEPARATOR(path[2]))
-        return true;
-#endif
-
-    return false;
-}
-
 /*
  * Creates an absolute path for a potentially relative path.
  * Return 0 if the path was not relative, or on success.
index 80641f763ad9139fec241786359ecd2da217bdd0..550d06ce945d7584120ea2f462188246bcf39338 100644 (file)
@@ -299,7 +299,6 @@ char *virFileBuildPath(const char *dir,
 
 #endif /* !WIN32 */
 
-bool virFileIsAbsPath(const char *path);
 int virFileAbsPath(const char *path,
                    char **abspath) G_GNUC_WARN_UNUSED_RESULT;
 void virFileRemoveLastComponent(char *path);