Skip to content

Libbpf userspace function btf__add_enum_value

0.2.0

Append new enum value for the current ENUM type

Definition

int btf__add_enum_value(struct btf *btf, const char *name, __s64 value);

Parameters

  • btf: pointer to a struct btf object
  • name: name of the enumerator value, can't be NULL or empty;
  • value: integer value corresponding to enum value name.

Return

0, on success; <0, on error.

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome