X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Favailable.c;h=6d2aea2266960e1cdd2b31a2b75614aeb8e17f9d;hb=8bc6e9d6a89672bbe1e7469774abe889354deb67;hp=77fdfa2c7ccb5f05c4fec942e760d2e7a00a222c;hpb=2d9953097b6d3b71122d444a4550047e97aee009;p=libguestfs.git diff --git a/daemon/available.c b/daemon/available.c index 77fdfa2..6d2aea2 100644 --- a/daemon/available.c +++ b/daemon/available.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -22,7 +22,7 @@ #include #include -#include "../src/guestfs_protocol.h" +#include "guestfs_protocol.h" #include "daemon.h" #include "actions.h" @@ -53,3 +53,21 @@ do_available (char *const *groups) return 0; } + +char ** +do_available_all_groups (void) +{ + size_t i; + char **groups = NULL; + int size = 0, alloc = 0; + + for (i = 0; optgroups[i].group != NULL; ++i) { + if (add_string (&groups, &size, &alloc, optgroups[i].group) == -1) + return NULL; + } + + if (add_string (&groups, &size, &alloc, NULL) == -1) + return NULL; + + return groups; /* caller frees */ +}