search for: ext2fs_free_blocks_count

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

2016 Apr 14
1
[PATCH supermin] ext2: fix printf formatters
...t;inttypes.h> /* Inlining is broken in the ext2fs header file. Disable it by * defining the following: @@ -659,9 +660,9 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) */ blocks = ROUND_UP (statbuf.st_size, data->fs->blocksize); if (blocks > ext2fs_free_blocks_count (data->fs->super)) { - fprintf (stderr, "supermin: %s: needed %lu blocks (%d each) for " - "%lu bytes, available only %llu\n", - src, blocks, data->fs->blocksize, statbuf.st_size, + fprintf (stderr, "supermin: %s: needed %zu...
2016 Jan 22
1
[supermin] [PATCH] ext2: check for needed block size
...we have enough free blocks to store the resulting blocks + * for this file. The file might need more than that in the filesystem, + * but at least this provides a quick check to avoid failing later on. + */ + blocks = ROUND_UP (statbuf.st_size, data->fs->blocksize); + if (blocks > ext2fs_free_blocks_count (data->fs->super)) { + fprintf (stderr, "supermin: %s: needed %lu blocks (%d each) for " + "%lu bytes, available only %llu\n", + src, blocks, data->fs->blocksize, statbuf.st_size, + ext2fs_free_blocks_count (data->fs-...