From: Barry Naujok Date: Thu, 20 Nov 2008 14:23:14 +0000 (+0000) Subject: xfstests: fix nr of args in open calls X-Git-Tag: v1.1.0~351 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=05163b1003ca0dab31579fd4a41c90c77486c3c3 xfstests: fix nr of args in open calls Merge of master-melb:xfs-cmds:32509a by kenmcd. fix nr of args in open calls --- diff --git a/ltp/iogen.c b/ltp/iogen.c index 17087285..b83b8f48 100644 --- a/ltp/iogen.c +++ b/ltp/iogen.c @@ -1060,7 +1060,7 @@ int nbytes; Oflags |= O_CREAT | O_WRONLY; - if ((fd = open(path, Oflags, 0666, Ocbits, Ocblks)) == -1) { + if ((fd = open(path, Oflags, 0666)) == -1) { fprintf(stderr, "iogen%s: Could not create/open file %s: %s (%d)\n", TagName, path, SYSERR, errno); return -1; diff --git a/src/dmiperf.c b/src/dmiperf.c index 03095edf..e27d783c 100644 --- a/src/dmiperf.c +++ b/src/dmiperf.c @@ -203,7 +203,7 @@ mkfile(char *name, char *attr) ssize_t wrote, wsize; off64_t bytes = fsize; - if ((fd = open(name, O_WRONLY | O_CREAT | O_EXCL | O_DIRECT)) < 0) { + if ((fd = open(name, O_WRONLY | O_CREAT | O_EXCL | O_DIRECT, 0666)) < 0) { perror("open"); exit(1); } diff --git a/src/enospc_unlink.c b/src/enospc_unlink.c index 0cfe53e3..b0b9c0d6 100644 --- a/src/enospc_unlink.c +++ b/src/enospc_unlink.c @@ -40,7 +40,7 @@ int main(int argc, char **argv) memset(ptr, 0xffffffff, sz); for (i = 0; i < count; i++) { - fd = open(argv[1], O_CREAT|O_WRONLY); + fd = open(argv[1], O_CREAT|O_WRONLY, 0666); if (fd < 0) { perror(argv[1]); exit(1); diff --git a/src/multi_open_unlink.c b/src/multi_open_unlink.c index f603f75b..d5d54763 100644 --- a/src/multi_open_unlink.c +++ b/src/multi_open_unlink.c @@ -92,7 +92,7 @@ main(int argc, char *argv[]) return 1; } - fd = open(path, O_RDWR|O_CREAT|O_EXCL); + fd = open(path, O_RDWR|O_CREAT|O_EXCL, 0666); if (fd == -1) { fprintf(stderr, "%s: failed to create \"%s\": %s\n", prog, path, strerror(errno)); return 1;