diff options
author | Doug Ledford <dledford@redhat.com> | 2008-07-24 18:35:11 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2008-07-24 18:35:11 -0400 |
commit | fb97b4d691c04d9303571d7eba3cef4a97264e2f (patch) | |
tree | f2ecbee4bd0d262c6a92ac631c642458921f1d8b /Grow.c | |
parent | 0bc38b50205db04cd842c5009467a57b1ee1c293 (diff) | |
download | mdadm-fb97b4d691c04d9303571d7eba3cef4a97264e2f.tar.gz mdadm-fb97b4d691c04d9303571d7eba3cef4a97264e2f.tar.xz mdadm-fb97b4d691c04d9303571d7eba3cef4a97264e2f.zip |
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 <dledford@redhat.com>
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -686,7 +686,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, } spares = sra->array.spare_disks; if (backup_file) { - fdlist[d] = open(backup_file, O_RDWR|O_CREAT|O_EXCL, 0600); + fdlist[d] = open(backup_file, O_RDWR|O_CREAT|O_EXCL, S_IRUSR | S_IWUSR); if (fdlist[d] < 0) { fprintf(stderr, Name ": %s: cannot create backup file %s: %s\n", devname, backup_file, strerror(errno)); |