Improved drive capacity estimation for sparse regular files
This commit is contained in:
@ -1051,7 +1051,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
|
||||
0 = could not estimate size capacity of file object
|
||||
1 = estimation has been made, bytes was set
|
||||
*/
|
||||
int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
|
||||
{
|
||||
struct stat stbuf;
|
||||
struct statvfs vfsbuf;
|
||||
@ -1104,7 +1104,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
{ret = -2; goto ex;}
|
||||
*bytes = add_size;
|
||||
} else if(S_ISREG(stbuf.st_mode)) {
|
||||
add_size = stbuf.st_blocks * (off_t) 512;
|
||||
add_size = burn_sparse_file_addsize(write_start, &stbuf);
|
||||
strcpy(testpath, path);
|
||||
} else
|
||||
{ret = 0; goto ex;}
|
||||
|
Reference in New Issue
Block a user