提交 c727ed42 编写于 作者: F Fabiano Fidêncio

util: Remove virFileIsAbsPath()

The function is no longer used since commit faf2d811.
Signed-off-by: NFabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 ed12b030
......@@ -1994,7 +1994,6 @@ virFileGetMountSubtree;
virFileGetXAttr;
virFileGetXAttrQuiet;
virFileInData;
virFileIsAbsPath;
virFileIsCDROM;
virFileIsDir;
virFileIsExecutable;
......
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册