search for: statvfsbuf

Displaying 2 results from an estimated 2 matches for "statvfsbuf".

Did you mean: statfsbuf
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...uf; @@ -551,13 +556,13 @@ ext2_copy_file (ext2_filsys fs, const char *src, const char *dest) * Note we cheat by looking at fs->device_name (which is the output * file). We could store this filename separately. */ - if (fs->device_name && statvfs (fs->device_name, &statvfsbuf) == 0) { + if (data->fs->device_name && statvfs (data->fs->device_name, &statvfsbuf) == 0) { uint64_t space = statvfsbuf.f_bavail * statvfsbuf.f_bsize; uint64_t estimate = 128*1024 + 2 * statbuf.st_size; if (space < estimate) unix_error (ENOSPC, (...
2016 Jan 22
1
[supermin] [PATCH] ext2: check for needed block size
...ny blocks of size S are needed for storing N bytes. */ +#define ROUND_UP(N, S) (((N) + (S) - 1) / (S)) + struct ext2_data { ext2_filsys fs; @@ -629,6 +632,7 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) errcode_t err; struct stat statbuf; struct statvfs statvfsbuf; + size_t blocks; if (data->debug >= 3) printf ("supermin: ext2: copy_file %s -> %s\n", src, dest); @@ -649,6 +653,20 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) caml_copy_string (data->fs->device_name)); }...