[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] daemon/file.c: remove duplicate absolute-path check



Richard W.M. Jones wrote:
> On Fri, Aug 07, 2009 at 08:07:50PM +0200, Jim Meyering wrote:
>> minor clean-up:
>>
>> >From cac2ce53aec6d3aaca83e4bbc3551d452c29c0b2 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <meyering redhat com>
>> Date: Fri, 7 Aug 2009 20:07:03 +0200
>> Subject: [PATCH] daemon/file.c: remove duplicate absolute-path check
>>
>> * daemon/file.c (do_file): Remove redundant use of ABS_PATH.
>> It's redundant because the preceding line invokes NEED_ROOT_OR_IS_DEVICE,
>> which also invokes ABS_PATH.
>
> Agreed, ACK.

Pushed.

> If we had a separate 'Path' type in the generator, then these checks
> could be automated.
>
> That is to say, splitting the existing String variant into String .. |
> Device .. | Path .. | DeviceOrPath .., where DeviceOrPath is just
> needed for the couple of functions that wrongly take a string which
> could be a device or a path ('file' being one of these).
>
> Also note that most (all?) paths get rewritten in the non-generated
> code to prefix them with the content of the sysroot global variable.
> (See: sysroot, sysroot_path and the %R custom printf spec).  This is
> particularly error-prone and probably another candidate for
> automation.

Thanks.
I'm working on this now.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]