1 Star 0 Fork 19

张洪涛/libblockdev

forked from src-openEuler/libblockdev 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-fs-Fix-return-values-in-bd_fs_ntfs_get_info.patch 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
Wenchao Hao 提交于 2021-11-17 22:43 . update to libblockdev-2.26-1
From 90b119f3026af68e2478450c7a71ed0fe68a9cbc Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 11 Aug 2020 18:00:57 +0200
Subject: [PATCH 07/15] fs: Fix return values in bd_fs_ntfs_get_info
---
src/plugins/fs/ntfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/plugins/fs/ntfs.c b/src/plugins/fs/ntfs.c
index fdd959a..b406f41 100644
--- a/src/plugins/fs/ntfs.c
+++ b/src/plugins/fs/ntfs.c
@@ -253,7 +253,7 @@ BDFSNtfsInfo* bd_fs_ntfs_get_info (const gchar *device, GError **error) {
g_autofree gchar* mountpoint = NULL;
if (!check_deps (&avail_deps, DEPS_NTFSCLUSTER_MASK, deps, DEPS_LAST, &deps_check_lock, error))
- return FALSE;
+ return NULL;
mountpoint = bd_fs_get_mountpoint (device, error);
if (mountpoint != NULL) {
@@ -270,7 +270,7 @@ BDFSNtfsInfo* bd_fs_ntfs_get_info (const gchar *device, GError **error) {
success = bd_utils_exec_and_capture_output (args, NULL, &output, error);
if (!success)
/* error is already populated */
- return FALSE;
+ return NULL;
ret = g_new0 (BDFSNtfsInfo, 1);
lines = g_strsplit (output, "\n", 0);
@@ -283,7 +283,7 @@ BDFSNtfsInfo* bd_fs_ntfs_get_info (const gchar *device, GError **error) {
g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_PARSE, "Failed to parse NTFS file system information");
g_strfreev (lines);
bd_fs_ntfs_info_free (ret);
- return FALSE;
+ return NULL;
}
/* extract data from something like this: "bytes per volume : 998240256" */
@@ -297,7 +297,7 @@ BDFSNtfsInfo* bd_fs_ntfs_get_info (const gchar *device, GError **error) {
g_set_error (error, BD_FS_ERROR, BD_FS_ERROR_PARSE, "Failed to parse NTFS file system information");
g_strfreev (lines);
bd_fs_ntfs_info_free (ret);
- return FALSE;
+ return NULL;
}
/* extract data from something like this: "bytes of free space : 992759808" */
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Zht-Try/libblockdev.git
git@gitee.com:Zht-Try/libblockdev.git
Zht-Try
libblockdev
libblockdev
master

搜索帮助