Commit Graph

2 Commits

Author SHA1 Message Date
Kevin Pouget
ec4e44200a utils: add set_bitmap/test_bitmap functions
This patch introduces `set_bitmap` and `test_bitmap` + relevant
macros, adapted from `<qemu>/include/qemu/bitops.h`.

These functions differ from `set_bit`/`test_bit` as they can set/test
bits in bit arrays longer than scalar data-types.

Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2020-03-04 16:43:48 +00:00
Christophe Fergeau
6077523a5f utils: Add genum -> string helpers
This makes it easier to convert enums registered with glib type system
to string in order to print them at runtime.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-11-23 10:25:01 +00:00