search for: find_or_cache_feature

Displaying 3 results from an estimated 3 matches for "find_or_cache_feature".

2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
.../available.c +++ b/src/available.c @@ -18,17 +18,87 @@ #include <config.h> +#include <string.h> +#include <libintl.h> + #include "guestfs.h" +#include "guestfs-internal.h" #include "guestfs-internal-actions.h" +static struct cached_feature * +find_or_cache_feature (guestfs_h *g, const char *group) +{ + struct cached_feature *f; + size_t i; + int res; + + for (i = 0; i < g->nr_features; ++i) { + f = &g->features[i]; + + if (STRNEQ (f->group, group)) + continue; + + return f; + } + + res = guestfs_internal_feature_available...
2015 Nov 06
2
Re: [PATCH 2/2] actions: refactor available & feature_available
...d ==25905== ==25905== 41 (32 direct, 9 indirect) bytes in 1 blocks are definitely lost in loss record 696 of 775 ==25905== at 0x4C2AB9D: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25905== by 0x4ECF846: guestfs_int_safe_realloc (alloc.c:80) ==25905== by 0x4ED05FF: find_or_cache_feature (available.c:48) ==25905== by 0x4ED073C: guestfs_impl_feature_available (available.c:89) ==25905== by 0x4EA4B21: guestfs_feature_available (actions-5.c:1131) ==25905== by 0x4EF9FDF: guestfs_impl_list_filesystems (listfs.c:49) ==25905== by 0x4E7EDF2: guestfs_list_filesystems (actions-3.c...
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
Rename the current available and feature_available into internal daemon functions, and provide non-daemon functions wrapping them at library side. This will make it possible to e.g. add caching for them. Should be only refactoring, no actual behaviour change. --- daemon/available.c | 4 +- generator/actions.ml | 192 ++++++++++++++++++++++++++++----------------------- po/POTFILES |