From be31adb5f60dbeeed5051019ca1f980e29f61ea7 Mon Sep 17 00:00:00 2001 From: adilger Date: Sun, 23 Jun 2002 03:16:32 +0000 Subject: [PATCH] Allow specifying > 4GB sizes for truncate via strtoull(). --- lustre/tests/truncate.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/tests/truncate.c b/lustre/tests/truncate.c index 3c3ad94..f21bf9d1 100644 --- a/lustre/tests/truncate.c +++ b/lustre/tests/truncate.c @@ -9,15 +9,15 @@ int main(int argc, char **argv) unsigned long long off; int err; - if (argc != 3) { - printf("usage %s file bytes\n", argv[0]); + if (argc != 3) { + printf("usage %s file bytes\n", argv[0]); return 1; } - off = strtoul(argv[2], NULL, 0); - err = truncate64(argv[1], off); - if ( err ) { + off = strtoull(argv[2], NULL, 0); + err = truncate64(argv[1], off); + if ( err ) printf("Error truncating %s: %s\n", argv[1], strerror(errno)); - } + return err; } -- 1.8.3.1