[lsb-discuss] Hi everyone

Mats Wichmann mats.d.wichmann at intel.com
Mon Dec 6 19:14:52 PST 2010

On 12/06/2010 06:38 PM, ruizhe zhao wrote:
> My name is Ruizhe, I'm a Chinese, and my english is not pretty good, so
> I so so so sorry
> if I stage some bungling presentations, and any correction is appreciated.
> A sentence make me in trouble when I reading the LSB-Core-Generic 3.0
> document, it is:
> ...
> 3.3 LSB Application Conformance
>      ...
>      * It shall not use any values for a named interface that are
> reserved for vendor
>        extensions.
> Does it means that as following sample code and comments?
> ret = some_fun ( VALUES, ... );
> Is the some_fun reserved for vendor extension? and if I want my app to
> be a conforming
> application and I shoud NOT call any interface that are reserved for
> vendor extensions?
> But if my guess is right, what is the *values* meaning?
> Thanks for any suggestion.

I can't give you an real life example that's caused problems,
but think of an interface such as ioctl().  There may be many
possible values for the second parameter, and some may be
reserved for the purpose of obtaining details about a specific
piece of hardware, and those you shouldn't use.  Indeed,
if you look in /usr/include/bits/ioctls.h you may find a
section like this:

/* Device private ioctl calls.  */

/* These 16 ioctls are available to devices via the do_ioctl() device
    vector.  Each device should include this file and redefine these
    names as their own. Because these are device dependent it is a good
    idea _NOT_ to issue them to random objects and hope.  */

#define SIOCDEVPRIVATE          0x89F0  /* to 89FF */

This is the sort of thing the spec section is referring to.
Because the purpose is to allow writing applications that work
"everywhere", it's cautioning you to avoid passing parameters
to interfaces that are known not to be generic ("works everywhere")
in nature.

More information about the lsb-discuss mailing list