[parted-devel] [PATCH] Properly sync partitions with operating system

Jim Meyering jim at meyering.net
Thu Mar 5 17:51:06 UTC 2009


Jim Meyering wrote:
> Karel Zak wrote:
>> On Wed, Feb 25, 2009 at 11:59:33PM +0100, Joel Granados Moreno wrote:
>>> +static unsigned int
>>> +_device_get_partition_range(PedDevice* dev)
>>> +{
>>> +        int         range, r;
>>> +        char        path[128];
>>> +        FILE*       fp;
>>> +        bool        ok;
>>> +
>>> +        r = snprintf(path, sizeof(path), "/sys/block/%s/range",
>>> +                        basename(dev->path));
>>
>>  always _GNU_SOURCE, right? :-)
>
> Good portability catch.
> There are actually two uses of basename.
> I'll convert them to base_name or last_component
> (provided by gnulib's basename module).

I'm about to push this:



More information about the parted-devel mailing list