(** Path and filenames. *)
type info = {
+ kv_i : int; (** Each kernel is given a unique
+ number. *)
kernel_version : string; (** Kernel version that this matches. *)
arch : string; (** Architecture, eg. "i686", "ppc64". *)
basename : string; (** [basename.info] is the info
| FVoidPointer (** A [void*] pointer. *)
| FAnonListHeadPointer (** A pointer to an unknown
[list_head]. *)
- | FListHeadPointer of string (** A pointer to a [list_head] in a
- named struct. *)
+ | FListHeadPointer of (string * string) option
+ (** A pointer to a [list_head]. If the value is not [None] then
+ this relates to another named struct/field, else it relates
+ to this struct/field. *)
| FInteger (** An integer. *)
| FString of int (** A char array of given width. *)
(** Type of a kernel field. *)
The first parameter is the list of structure names of interest,
and should be the same as was passed to {!load_structures}. *)
-val get_fields : (info * structure) list -> (string * f_type) list
+val get_fields : (info * structure) list -> (string * (f_type * bool)) list
(** This gets a complete list of fields which have appeared in
- any kernel version, and the type of those fields.
+ any kernel version.
+
+ The return list contains [(field_name, (field_type,
+ always_present))] where [always_present] is a boolean flag which
+ is true if the field is present in every kernel version we
+ examined.
Fields must not change type between kernel versions - if
so this function prints an error and exits. (We may support