linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Check for failure in open_ctree() call. (LP: #926186)
@ 2012-07-03  0:25 Shawn Landden
  0 siblings, 0 replies; only message in thread
From: Shawn Landden @ 2012-07-03  0:25 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Shawn Landden

---
 btrfstune.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/btrfstune.c b/btrfstune.c
index 47830c5..f746e14 100644
--- a/btrfstune.c
+++ b/btrfstune.c
@@ -107,6 +107,10 @@ int main(int argc, char *argv[])
 	}
 
 	root = open_ctree(device, 0, 1);
+	if (!root) {
+		fprintf(stderr, "unable to open ctree\n");
+		return 1;
+        }
 
 	if (seeding_flag) {
 		ret = update_seeding_flag(root, seeding_value);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-03  0:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03  0:25 [PATCH] Check for failure in open_ctree() call. (LP: #926186) Shawn Landden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).