mirror of https://github.com/vitalif/e2fsprogs
misc: Return error if file is too big for FIBMAP
parent
e703ba4b42
commit
2051d63a83
|
@ -474,6 +474,10 @@ static int frag_report(const char *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force_bmap || rc < 0) { /* FIEMAP failed, try FIBMAP instead */
|
if (force_bmap || rc < 0) { /* FIEMAP failed, try FIBMAP instead */
|
||||||
|
if (numblocks > (unsigned long)-1L) {
|
||||||
|
fprintf(stderr, "%s: File too big to use FIBMAP\n", filename);
|
||||||
|
goto out_close;
|
||||||
|
}
|
||||||
expected = filefrag_fibmap(fd, blk_shift, &num_extents,
|
expected = filefrag_fibmap(fd, blk_shift, &num_extents,
|
||||||
&st, numblocks, is_ext2);
|
&st, numblocks, is_ext2);
|
||||||
if (expected < 0) {
|
if (expected < 0) {
|
||||||
|
|
Loading…
Reference in New Issue