Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
523937f
)
Don't pass garbage mode bits to the filesystem with O_CREAT.
author
adilger
<adilger>
Thu, 12 Feb 2004 18:19:54 +0000
(18:19 +0000)
committer
adilger
<adilger>
Thu, 12 Feb 2004 18:19:54 +0000
(18:19 +0000)
It is really the fault of K&R that there are 2 different open prototypes.
lustre/tests/openfile.c
patch
|
blob
|
history
diff --git
a/lustre/tests/openfile.c
b/lustre/tests/openfile.c
index
81236b0
..
d494b4a
100644
(file)
--- a/
lustre/tests/openfile.c
+++ b/
lustre/tests/openfile.c
@@
-53,7
+53,7
@@
int main(int argc, char** argv)
{
int fd;
int flags=0;
- mode_t mode=0;
+ mode_t mode=0
644
;
char* fname=NULL;
int mode_set=0;
int flag_set=0;
@@
-131,7
+131,7
@@
int main(int argc, char** argv)
}
- if (
mode_set
)
+ if (
flags & O_CREAT
)
fd = open(fname, flags, mode);
else
fd = open(fname, flags);