From fb97b4d691c04d9303571d7eba3cef4a97264e2f Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Thu, 24 Jul 2008 18:35:11 -0400 Subject: Clean up usage of open() Fix on call that passed an invalid mode to open Don't pass a third arg unless we also pass O_CREAT Use symbolic args for 2nd and 3rd args Signed-off-by: Doug Ledford --- Query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Query.c') diff --git a/Query.c b/Query.c index 0802964..190ee29 100644 --- a/Query.c +++ b/Query.c @@ -37,7 +37,7 @@ int Query(char *dev) * whether it is an md device and whether it has * a superblock */ - int fd = open(dev, O_RDONLY, 0); + int fd = open(dev, O_RDONLY); int vers; int ioctlerr; int superror, superrno; -- cgit