[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1389106394-31898-9-git-send-email-tytso@mit.edu>
Date: Tue, 7 Jan 2014 09:53:13 -0500
From: Theodore Ts'o <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc: Theodore Ts'o <tytso@....edu>
Subject: [PATCH 09/10] badblocks: print warning if set_o_direct() fails
Addresses-Coverity-Id: #1049148
Signed-off-by: "Theodore Ts'o" <tytso@....edu>
---
misc/badblocks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/misc/badblocks.c b/misc/badblocks.c
index 912ef28..e5024f6 100644
--- a/misc/badblocks.c
+++ b/misc/badblocks.c
@@ -300,7 +300,8 @@ static void set_o_direct(int dev, unsigned char *buffer, size_t size,
flag = fcntl(dev, F_GETFL);
if (flag > 0) {
flag = (flag & ~O_DIRECT) | new_flag;
- fcntl(dev, F_SETFL, flag);
+ if (fcntl(dev, F_SETFL, flag) < 0)
+ perror("set_o_direct");
}
current_O_DIRECT = new_flag;
}
--
1.8.5.rc3.362.gdf10213
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists