[Ocfs2-tools-devel] [PATCH 1/1] o2image use statfs64 instead of statfs
Sunil Mushran
sunil.mushran at oracle.com
Mon Apr 19 09:48:25 PDT 2010
Srinivas Eeda wrote:
> This patch replaces statfs call with statfs64
>
> Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com>
> ---
> o2image/o2image.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/o2image/o2image.c b/o2image/o2image.c
> index dae649f..52d36be 100644
> --- a/o2image/o2image.c
> +++ b/o2image/o2image.c
> @@ -500,12 +500,12 @@ static int prompt_image_creation(ocfs2_filesys *ofs, int rawflg, char *filename)
> {
> int i, n;
> uint64_t free_spc;
> - struct statfs stat;
> + struct statfs64 stat;
> uint64_t img_size = 0;
> char *filepath;
>
> filepath = strdup(filename);
> - statfs(dirname(filepath), &stat);
> + statfs64(dirname(filepath), &stat);
>
What if it errors?
> free_spc = stat.f_bsize * stat.f_bavail;
>
> n = ofs->ost->ost_bmpblks - 1;
>
More information about the Ocfs2-tools-devel
mailing list