提交 d66e7ce6 编写于 作者: P Peter Krempa

util: Declare that virFileExists shall honor errno

Explicitly state that some parts of the code may require virFileExists
to set or preserve a correct errno so that future modifications don't
break.
上级 6c038ee3
......@@ -1477,6 +1477,12 @@ virFileIsDir(const char *path)
return (stat(path, &s) == 0) && S_ISDIR(s.st_mode);
}
/**
* virFileExists: Check for presence of file
* @path: Path of file to check
*
* Returns if the file exists. Preserves errno in case it does not exist.
*/
bool
virFileExists(const char *path)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册