1 Star 0 Fork 17

张洪涛 / libblockdev

forked from src-openEuler / libblockdev 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0007-fs-Fix-return-values-in-bd_fs_xfs_get_info.patch 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
Wenchao Hao 提交于 2021-11-17 22:43 . update to libblockdev-2.26-1
From 63f5df1992b15c1d6a442f2d392fa3b92ecf7b92 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 11 Aug 2020 18:04:58 +0200
Subject: [PATCH 08/15] fs: Fix return values in bd_fs_xfs_get_info
---
src/plugins/fs/xfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/plugins/fs/xfs.c b/src/plugins/fs/xfs.c
index b8b4bbe..d28ce72 100644
--- a/src/plugins/fs/xfs.c
+++ b/src/plugins/fs/xfs.c
@@ -274,7 +274,7 @@ BDFSXfsInfo* bd_fs_xfs_get_info (const gchar *device, GError **error) {
if (!success) {
/* error is already populated */
bd_fs_xfs_info_free (ret);
- return FALSE;
+ return NULL;
}
lines = g_strsplit (output, "\n", 0);
@@ -288,7 +288,7 @@ BDFSXfsInfo* bd_fs_xfs_get_info (const gchar *device, GError **error) {
g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_PARSE, "Failed to parse xfs file system information");
g_strfreev (lines);
bd_fs_xfs_info_free (ret);
- return FALSE;
+ return NULL;
}
/* extract data from something like this: "data = bsize=4096 blocks=262400, imaxpct=25" */
@@ -305,7 +305,7 @@ BDFSXfsInfo* bd_fs_xfs_get_info (const gchar *device, GError **error) {
g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_PARSE, "Failed to parse xfs file system information");
g_strfreev (lines);
bd_fs_xfs_info_free (ret);
- return FALSE;
+ return NULL;
}
while (isdigit (*val_start) || isspace(*val_start))
val_start++;
@@ -318,7 +318,7 @@ BDFSXfsInfo* bd_fs_xfs_get_info (const gchar *device, GError **error) {
g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_PARSE, "Failed to parse xfs file system information");
g_strfreev (lines);
bd_fs_xfs_info_free (ret);
- return FALSE;
+ return NULL;
}
g_strfreev (lines);
--
1.8.3.1
1
https://gitee.com/Zht-Try/libblockdev.git
git@gitee.com:Zht-Try/libblockdev.git
Zht-Try
libblockdev
libblockdev
master

搜索帮助