From 840d23222b53f8d9fff424fae87e88054323bfb3 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 25 Jan 2006 12:01:33 +0000 Subject: [PATCH] Branch b_release_1_4_6 Check return value from fstat(). (COV:629) b=10098 --- lustre/tests/fsx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/tests/fsx.c b/lustre/tests/fsx.c index a0f4c39..6cf43ee 100644 --- a/lustre/tests/fsx.c +++ b/lustre/tests/fsx.c @@ -531,7 +531,10 @@ check_trunc_hack(void) ftruncate(fd, (off_t)0); ftruncate(fd, (off_t)100000); - fstat(fd, &statbuf); + if (fstat(fd, &statbuf)) { + prterr("trunc_hack: fstat"); + statbuf.st_size = -1; + } if (statbuf.st_size != (off_t)100000) { prt("no extend on truncate! not posix!\n"); exit(130); -- 1.8.3.1