search for: do_modprobe

Displaying 10 results from an estimated 10 matches for "do_modprobe".

2009 Aug 18
1
[PATCH] guestfs_modprobe: explicitly load a kernel module in the appliance
...the + * GNU General Public License for more details. + * + * 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. + */ + +#include "daemon.h" + +int +do_modprobe (const char *module) +{ + const char *argv[] = { + "/sbin/modprobe", + NULL, + NULL + }; + + argv[1] = module; + + char *out, *err; + int r = commandv (&out, &err, (char **) argv); + + if (r == -1) { + reply_with_error ("%s", err); + } + + free (out);...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009-2012 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,11 @@ int do_modprobe (const char *module) { char *err; - int r = command (NULL, &err, "modprobe", module, NULL); + int r; + + IF_NOT_AVAILABLE_ERROR (linuxmodules, -1); + + r = command (NULL, &err, "modprobe", module, NULL); if (r == -1) { reply_with_error ("%s",...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...+++ b/daemon/modprobe.c @@ -25,17 +25,19 @@ #include "actions.h" #include "optgroups.h" +GUESTFSD_EXT_CMD(str_modprobe, modprobe); + int optgroup_linuxmodules_available (void) { - return prog_exists ("modprobe"); + return prog_exists (str_modprobe); } int do_modprobe (const char *module) { char *err; - int r = command (NULL, &err, "modprobe", module, NULL); + int r = command (NULL, &err, str_modprobe, module, NULL); if (r == -1) { reply_with_error ("%s", err); diff --git a/daemon/mount.c b/daemon/mount.c index bd27f94...
2012 Aug 30
1
[PATCH] collect list of called external commands
...+++ b/daemon/modprobe.c @@ -25,17 +25,19 @@ #include "actions.h" #include "optgroups.h" +GUESTFS_EXT_CMD(str_modprobe, modprobe); + int optgroup_linuxmodules_available (void) { - return prog_exists ("modprobe"); + return prog_exists (str_modprobe); } int do_modprobe (const char *module) { char *err; - int r = command (NULL, &err, "modprobe", module, NULL); + int r = command (NULL, &err, str_modprobe, module, NULL); if (r == -1) { reply_with_error ("%s", err); diff --git a/daemon/mount.c b/daemon/mount.c index bd27f94...
2013 Aug 24
46
[PATCH 00/46] Proposed patches for libguestfs 1.20.11.
Tested with 'make check-release'. tests/parallel (in check-slow) failed, although it does regularly and that seems to be because of libvirt. Rich.
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...inuxmodules_available (void) { @@ -39,7 +37,7 @@ optgroup_linuxmodules_available (void) if (access ("/proc/modules", R_OK) == -1 && errno == ENOENT) return 0; - return prog_exists (str_modprobe); + return prog_exists ("modprobe"); } int @@ -48,7 +46,7 @@ do_modprobe (const char *module) CLEANUP_FREE char *err = NULL; int r; - r = command (NULL, &err, str_modprobe, module, NULL); + r = command (NULL, &err, "modprobe", module, NULL); if (r == -1) { reply_with_error ("%s", err); diff --git a/daemon/mount.c b/daemon/...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...p_linuxmodules_available (void) @@ -39,7 +39,7 @@ optgroup_linuxmodules_available (void) if (access ("/proc/modules", R_OK) == -1 && errno == ENOENT) return 0; - return prog_exists (str_modprobe); + return prog_exists ("modprobe"); } int @@ -48,7 +48,7 @@ do_modprobe (const char *module) CLEANUP_FREE char *err = NULL; int r; - r = command (NULL, &err, str_modprobe, module, NULL); + r = command (NULL, &err, "modprobe", module, NULL); if (r == -1) { reply_with_error ("%s", err); diff --git a/daemon/mount.c b/daemon/...
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’
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.