From c727ed422453883dea998a6983194ce81ba90468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 18 Dec 2019 20:43:25 +0100 Subject: [PATCH] util: Remove virFileIsAbsPath() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function is no longer used since commit faf2d811f3e9a4. Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Cole Robinson Reviewed-by: Daniel Henrique Barboza --- src/libvirt_private.syms | 1 - src/util/virfile.c | 19 ------------------- src/util/virfile.h | 1 - 3 files changed, 21 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 797c15bb42..a7b1ef23bc 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1994,7 +1994,6 @@ virFileGetMountSubtree; virFileGetXAttr; virFileGetXAttrQuiet; virFileInData; -virFileIsAbsPath; virFileIsCDROM; virFileIsDir; virFileIsExecutable; diff --git a/src/util/virfile.c b/src/util/virfile.c index 624bd9e3d0..b72d18b3d2 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -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. diff --git a/src/util/virfile.h b/src/util/virfile.h index 80641f763a..550d06ce94 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -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); -- GitLab