[illumos-Developer] Review: 235 SMF Service reports zfssnap-roleadd in maintenance state & 335 service manifest does not support multiple manpage references for the same keyword

Albert Lee trisk at opensolaris.org
Mon Dec 6 07:22:36 PST 2010


On Mon, Dec 6, 2010 at 2:15 AM, Garrett D'Amore <garrett at damore.org> wrote:
> These changes look reasonable to me.   Although I'd recommend using
> asprintf() at svccfg_xml.c:1948 and elide 1949 and 19450.  Admittedly, I
> don't understand what 1951-1960 are doing, and what the implications of
> an unlimited length there would be.
>

1952-1960 concatenate the first and last half of a string over the
maximum length, truncating them and inserting ".." in the middle.
The length will always be max_scf_len so the strlen() is unnecessary.

asprintf() would work, 2 * max_scf_len is sort of an arbitrary limit.

-Albert



More information about the Developer mailing list