Hey Torsten,
On Sun, Jun 12, 2016 at 4:14 PM, Torsten Bögershausen wrote:
>>> So what I understand, you want something like this:
>>>
>>> +ssize_t file_size_not_zero(const char *filename)
>>> +{
>>> + struct stat st;
>>> + if (stat(filename, &st) < 0)
>>> + return -1;
>>
>> So what I understand, you want something like this:
>>
>> +ssize_t file_size_not_zero(const char *filename)
>> +{
>> + struct stat st;
>> + if (stat(filename, &st) < 0)
>> + return -1;
>> + return !!st.st_size);
>> +}
>
> For the purpose of bisect_reset(), Yes. B
Hey Torsten,
On Wed, Jun 8, 2016 at 1:47 PM, Torsten Bögershausen wrote:
> On 06/08/2016 09:57 AM, Pranit Bauva wrote:
>>
>> Hey Eric,
>>
>> On Wed, Jun 8, 2016 at 1:07 PM, Eric Sunshine
>> wrote:
>>>
>>> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva
>>> wrote:
dir: introduce file_size
On Wed, Jun 8, 2016 at 10:13 AM, Eric Sunshine wrote:
>
> I think this would be clearer if you instead added a function to
> bisect--helper.c which operates at a semantically higher level than
> what you have here (and drop this file_size() function). Specifically,
> add a function which tells you
On 06/08/2016 09:57 AM, Pranit Bauva wrote:
Hey Eric,
On Wed, Jun 8, 2016 at 1:07 PM, Eric Sunshine wrote:
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote:
dir: introduce file_size() to check the size of file
At times we require to see if the file is empty and get the size of the
file. B
On Wed, Jun 8, 2016 at 3:57 AM, Pranit Bauva wrote:
> On Wed, Jun 8, 2016 at 1:07 PM, Eric Sunshine wrote:
>> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote:
>>> dir: introduce file_size() to check the size of file
>>>
>>> At times we require to see if the file is empty and get the size of t
Hey Eric,
On Wed, Jun 8, 2016 at 1:07 PM, Eric Sunshine wrote:
> On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote:
>> dir: introduce file_size() to check the size of file
>>
>> At times we require to see if the file is empty and get the size of the
>> file. By using stat we can get the file si
On Tue, Jun 7, 2016 at 4:54 PM, Pranit Bauva wrote:
> dir: introduce file_size() to check the size of file
>
> At times we require to see if the file is empty and get the size of the
> file. By using stat we can get the file size without actually having to
> open the file to check for its contents
At times we require to see if the file is empty and get the size of the
file. By using stat we can get the file size without actually having to
open the file to check for its contents.
Mentored-by: Lars Schneider
Mentored-by: Christian Couder
Signed-off-by: Pranit Bauva
---
dir.c | 8
9 matches
Mail list logo