[Debian-ha-commits] [ocfs2-tools] 40/58: mounted.ocfs2: fix error checking
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Tue Jun 20 13:40:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch upstream
in repository ocfs2-tools.
commit 8568da8e5d1cd6778a747647d19e07905fa18ac4
Author: Junxiao Bi <junxiao.bi at oracle.com>
Date: Wed Jun 24 16:07:24 2015 +0800
mounted.ocfs2: fix error checking
ocfs2_get_device_size() return non-zero when failed.
Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
Reviewed-by: Joseph Qi <joseph.qi at huawei.com>
---
mounted.ocfs2/mounted.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mounted.ocfs2/mounted.c b/mounted.ocfs2/mounted.c
index c40f5f5..a1b8172 100644
--- a/mounted.ocfs2/mounted.c
+++ b/mounted.ocfs2/mounted.c
@@ -366,14 +366,15 @@ static errcode_t build_partition_list(struct list_head *dev_list, char *device)
}
/* skip devices smaller than 1M */
- ret = ocfs2_get_device_size(dev->dev_name, 4096, &numblocks);
- if (ret < 0) {
+
+ if (ocfs2_get_device_size(dev->dev_name, 4096, &numblocks)) {
verbosef(VL_DEBUG, "Unable to get size of %s\n",
dev->dev_name);
ocfs2_free(&dev);
continue;
}
+
if (numblocks <= (1024 * 1024 / 4096)) {
verbosef(VL_DEBUG, "Skipping small device %s\n",
dev->dev_name);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git
More information about the Debian-HA-Commits
mailing list