Hello Nick,
In case /proc or /sys wouldn't be preffered, a simple key value
binary format would do.
First a key/value pair count. Followed by the key/value pairs, which
consist out of the value and key prefixed by their size.
Your user and kernel code could ignore keys they don't regognize.
A better way though, is negotiate what types of structures to pass.
The user space program would support all previous version of the kernel module.
Bas
On 10/2/05, Nick Piggin <[email protected]> wrote:
> James Courtier-Dutton wrote:
>
> > I have a requirement to pass information from the kernel to user space.
> > The information is passed fairly rarely, but over time extra parameters
> > are added. At the moment we just use a struct, but that means that the
> > kernel and the userspace app have to both keep in step. If something
> > like XML was used, we could implement new parameters in the kernel, and
> > the user space could just ignore them, until the user space is upgraded.
> > XML would initially seem a good idea for this, but are there any methods
> > currently used in the kernel that could handle these parameter changes
> > over time.
> >
> > For example, should the sysfs be used for this?
> >
> > Any comments?
> >
>
> Yes use sysfs (or procfs if the information is related to a process).
> Using ASCII text representation, and a single value per file is
> noramlly the preferred method to do this I think.
>
> Nick
>
> --
> SUSE Labs, Novell Inc.
>
>
> Send instant messages to your online friends http://au.messenger.yahoo.com
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Bas Westerbaan
http://blog.w-nz.com/
GPG Public Keys: http://w-nz.com/keys/bas.westerbaan.asc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]