search for: guestfs_impl_feature_available

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

2015 Nov 06
2
Re: [PATCH 2/2] actions: refactor available & feature_available
...s 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:419) ==25905== by 0x4EE0FD2: guestfs_impl_inspect_os (inspect.c:62) ==2...
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
...klin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <config.h> + +#include "guestfs.h" +#include "guestfs-internal-actions.h" + +int +guestfs_impl_available (guestfs_h *g, char *const *groups) +{ + return guestfs_internal_available (g, groups); +} + +int +guestfs_impl_feature_available (guestfs_h *g, char *const *groups) +{ + return guestfs_internal_feature_available (g, groups); +} -- 2.1.0
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...if (f == NULL) + return -1; + + if (f->result == 2) { + error (g, _("%s: unknown group"), group); + return -1; + } else if (f->result == 1) { + error (g, _("%s: group not available"), group); + return -1; + } + } + + return 0; } int guestfs_impl_feature_available (guestfs_h *g, char *const *groups) { - return guestfs_internal_feature_available (g, groups); + char *const *ptr; + + for (ptr = groups; *ptr != NULL; ++ptr) { + const char *group = *ptr; + struct cached_feature *f = find_or_cache_feature (g, group); + + if (f == NULL) + return -...