On Thu, Apr 27, 2017 at 1:26 PM, Grazvydas Ignotas <nota...@gmail.com>
wrote:

> On Thu, Apr 27, 2017 at 4:15 AM, Timothy Arceri <tarc...@itsqueeze.com>
> wrote:
>
>> diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
>> index 9fd7b96..2764017 100644
>> --- a/src/util/disk_cache.c
>> +++ b/src/util/disk_cache.c
>> @@ -525,21 +525,21 @@ unlink_lru_file_from_directory(const char *path)
>>        return 0;
>>
>>     if (stat(filename, &sb) == -1) {
>>        free (filename);
>>        return 0;
>>     }
>>
>>     unlink(filename);
>>     free (filename);
>>
>> -   return sb.st_size;
>> +   return sb.st_blocks * 512;
>>
>
> I think other block sizes than 512 are possible, you can use sb.st_blocks
> * sb.st_blksize to take care of that.
>

Ugh ignore that, the manpage says it's always 512-byte units.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to