diff --git a/lustre/tests/createmany.c b/lustre/tests/createmany.c index 4c3bc2a61e3faf61dcc5e2c7d43e45a91769ec7c..77015a6a3b6069089eb8c7c4d6be7bc14c72e310 100644 --- a/lustre/tests/createmany.c +++ b/lustre/tests/createmany.c @@ -13,29 +13,28 @@ int main(int argc, char ** argv) int i, rc, count; char filename[4096]; - if (argc < 3) { + if (argc < 3) { printf("Usage %s filenamebase count\n", argv[0]); return 1; } - if (strlen(argv[1]) > 4080) { + if (strlen(argv[1]) > 4080) { printf("name too long\n"); return 1; } count = strtoul(argv[2], NULL, 0); - - for (i=0 ; i < count ; i++) { - sprintf(filename, "%s-%d", argv[1], i); + for (i=0 ; i < count ; i++) { + sprintf(filename, "%s-%d", argv[1], i); rc = mknod(filename, S_IFREG| 0444, 0); - if (rc) { - printf("mknod(%s) error: %s\n", + if (rc) { + printf("mknod(%s) error: %s\n", filename, strerror(errno)); break; } - if ( (i%10000) == 0 ) - printf(" - created %d (time %d)\n", i, time(0)); + if ((i % 10000) == 0) + printf(" - created %d (time %ld)\n", i, time(0)); } return rc; -} +}