lkml.org 
[lkml]   [2004]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch,rfc] BSD accounting format rework
    > One idea is to add the size of the structure to log. The start of the
    > struct could be something like:
    > struct acct_base {
    > char flags;
    > char ac_version;
    > __u16 ac_size;
    > }
    >
    > This makes future extentions easier in two seperate ways:
    > Userspace acct can recognize futuristic data structures. It will, of
    > course, not be able to process them, but it can warn the user and then
    > continue on to the next struct.
    >
    > Also, it would make it possible to add new fields at the end of the
    > structure _without_ bumping the version-number. (Like an extention to
    > the same format). When userspace find a v2 struct bigger that it's
    > "struct acct_v2" it can parse the first part of the data with struct
    > acct_v2 and just ignore the rest. This makes it trivial to add new
    > fields without breaking userspace.

    How about breaking the ac_version structure down as two nibbles? One
    half being the major version and the other half being a minor version.
    The major version, when changed, means the structure is no longer compatible.
    The minor version can be changed when existing fields are not modified
    in either form or function.

    Robin
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.047 / U:31.460 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site