Displaying 6 results from an estimated 6 matches for "do_internal_feature_avail".
2015 Nov 05
0
[PATCH 2/2] actions: refactor available & feature_available
...a/daemon/available.c b/daemon/available.c
index 6409b90..d50c737 100644
--- a/daemon/available.c
+++ b/daemon/available.c
@@ -33,53 +33,20 @@
GUESTFSD_EXT_CMD(str_grep, grep);
GUESTFSD_EXT_CMD(str_modprobe, modprobe);
-static int
-available (char *const *groups, int error_on_unavailable)
+int
+do_internal_feature_available (const char *group)
{
- int av;
- size_t i, j;
-
- for (i = 0; groups[i] != NULL; ++i) {
- for (j = 0; optgroups[j].group != NULL; ++j) {
- if (STREQ (groups[i], optgroups[j].group)) {
- av = optgroups[j].available ();
- if (!av) {
- if (error_on_unavailable)...
2015 Nov 05
4
[PATCH 1/2] actions: turn available & feature_available as non-daemon
...eate mode 100644 src/available.c
diff --git a/daemon/available.c b/daemon/available.c
index 54c6b9b..6409b90 100644
--- a/daemon/available.c
+++ b/daemon/available.c
@@ -67,13 +67,13 @@ available (char *const *groups, int error_on_unavailable)
}
int
-do_feature_available (char *const *groups)
+do_internal_feature_available (char *const *groups)
{
return available (groups, 0);
}
int
-do_available (char *const *groups)
+do_internal_available (char *const *groups)
{
if (available (groups, 1) == -1)
return -1;
diff --git a/generator/actions.ml b/generator/actions.ml
index 7ecd384..6348c88 100644
---...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...t a/daemon/available.c b/daemon/available.c
index 977c4dead..5ecb3f355 100644
--- a/daemon/available.c
+++ b/daemon/available.c
@@ -30,9 +30,6 @@
#include "actions.h"
#include "optgroups.h"
-GUESTFSD_EXT_CMD(str_grep, grep);
-GUESTFSD_EXT_CMD(str_modprobe, modprobe);
-
int
do_internal_feature_available (const char *group)
{
@@ -79,7 +76,7 @@ test_proc_filesystems (const char *filesystem)
return -1;
}
- r = commandr (NULL, &err, str_grep, regex, "/proc/filesystems", NULL);
+ r = commandr (NULL, &err, "grep", regex, "/proc/filesystems", NULL);...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...a1 100644
--- a/daemon/available.c
+++ b/daemon/available.c
@@ -30,8 +30,7 @@
#include "actions.h"
#include "optgroups.h"
-GUESTFSD_EXT_CMD(str_grep, grep);
-GUESTFSD_EXT_CMD(str_modprobe, modprobe);
+DECLARE_EXTERNAL_COMMANDS ("grep", "modprobe")
int
do_internal_feature_available (const char *group)
@@ -79,7 +78,7 @@ test_proc_filesystems (const char *filesystem)
return -1;
}
- r = commandr (NULL, &err, str_grep, regex, "/proc/filesystems", NULL);
+ r = commandr (NULL, &err, "grep", regex, "/proc/filesystems", NULL);...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’