[systemd-devel] [PATCH 1/7] libsystemd-bus: bring definitions in sync with kdbus

Yin Kangkai kangkai.yin at linux.intel.com
Wed Dec 4 00:13:37 PST 2013


On 2013-12-04, 08:49 +0100, Daniel Mack wrote:
> > Actually, I have a stupid question, do we have any particular reason
> > to use "part/PART"? giving the fact that we already have term "item"
> > everywhere in the code...
> > 
> > struct kdbus_item, items, kdbus_msg.items...
> > 
> > My opinion, on the contrary, we should replace all the KDBUS_PART_xxx
> > into KDBUS_ITEM_xxx, that seems more reasonable to me :)
> 
> Nope. A 'part' is more generic: anything that has size header and a
> dynamic length is a 'part' and can be iterated over with
> KDBUS_PART_FOREACH. Hence,  an 'item' is a 'part', but not vice versa.
> See struct kdbus_name_list for example.

Thanks Daniel for the reply.

OK now I understand KDBUS_PART_NEXT/FOREACH is not only for
"item".

But KDBUS_PART_HEADER_SIZE and KDBUS_PART_SIZE seems "item" specific,
no?

Regards,
Kangkai


More information about the systemd-devel mailing list