Ignore:
Timestamp:
2012-03-01T23:22:32Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0030eef
Parents:
3d23553
Message:

extend sysinfo generated subtree interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/sysinfo/sysinfo.h

    r3d23553 r5869ce0  
    7373typedef union {
    7474        sysarg_t val;               /**< Constant numberic value */
     75        sysinfo_data_t data;        /**< Constant binary data */
    7576        sysinfo_fn_val_t fn_val;    /**< Generated numeric value function */
    7677        sysinfo_fn_data_t fn_data;  /**< Generated binary data function */
    77         sysinfo_data_t data;        /**< Constant binary data */
    7878} sysinfo_item_val_t;
    7979
     
    9595
    9696/** Generated subtree function */
    97 typedef sysinfo_return_t (*sysinfo_fn_subtree_t)(const char *, bool);
     97typedef sysinfo_return_t (*sysinfo_fn_subtree_t)(const char *, bool, void *);
     98
     99/** Sysinfo generated subtree data
     100 *
     101 */
     102typedef struct {
     103        sysinfo_fn_subtree_t fn;  /**< Generated subtree function */
     104        void *data;               /**< Private data */
     105} sysinfo_fn_subtree_data_t;
    98106
    99107/** Sysinfo subtree (union)
     
    101109 */
    102110typedef union {
    103         struct sysinfo_item *table;     /**< Fixed subtree (list of subitems) */
    104         sysinfo_fn_subtree_t get_data;  /**< Generated subtree function */
     111        struct sysinfo_item *table;           /**< Fixed subtree (list of subitems) */
     112        sysinfo_fn_subtree_data_t generator;  /**< Generated subtree */
    105113} sysinfo_subtree_t;
    106114
     
    130138
    131139extern void sysinfo_set_subtree_fn(const char *, sysinfo_item_t **,
    132     sysinfo_fn_subtree_t);
     140    sysinfo_fn_subtree_t, void *);
    133141
    134142extern void sysinfo_init(void);
Note: See TracChangeset for help on using the changeset viewer.