LU-17000 utils: Add check after calling sysconf(_SC_PAGESIZE)
Calling sysconf(_SC_PAGESIZE) could return -1
on error. This patch adds check after calling
sysconf() instead of directly using the value
Test-Parameters: trivial testlist=sanity-flr
CoverityID: 397578 ("Argument cannot be negative")
CoverityID: 397246 ("Argument cannot be negative")
CoverityID: 397320 ("Argument cannot be negative")
CoverityID: 397671 ("Argument cannot be negative")
CoverityID: 397826 ("Argument cannot be negative")
CoverityID: 397898 ("Argument cannot be negative")
CoverityID: 397917 ("Argument cannot be negative")
CoverityID: 399702 ("Argument cannot be negative")
Fixes:
0561c144 (LU-13397 lfs: mirror extend/copy keeps sparseness)
Fixes:
a5905b2a (LU-11245 flr: lfs mirror dump command)
Fixes:
f1daa8fc (LU-10287 flr: lfs mirror verify command)
Fixes:
0e5c12ac (LU-10916 lfs: improve lfs mirror resync)
Fixes:
5d7c4fa6 (LU-9771 flr: mirror read and write)
Fixes:
5999c0b8 (LU-9771 flr: resync support and test tool)
Fixes:
9b44cf70 (LU-13224 utils: expose llapi_param* functions)
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I19d13528f63d4586a17aaa9d15313872f8c40c94
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53693
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>