search for: get_arg

Displaying 20 results from an estimated 48 matches for "get_arg".

Did you mean: get_args
2003 Nov 22
0
[PATCH] option parsing in kinit/kinit.c get_arg()
what is the purpose of get_arg()? should it return the option itself and/or the arguments passed to an option? this patch returns either 'rw' or '/dev/nfs' if name was root=/dev/nfs --- usr/klibc/klibc-0.81.orig/kinit/kinit.c 2003-06-01 08:18:41.000000000 +0200 +++ usr/klibc/klibc-0.81/kinit/kinit.c 2003-11-2...
2005 Jan 05
0
[PATCH] kinit.c:get_arg()
There's an "if" statement in kinit.c:get_arg() that is too restrictive and prevents args from having arguments - which causes all get_arg() calls to fail: --- klibc-0.194/kinit/kinit.c.orig 2005-01-05 01:34:50.680645456 -0700 +++ klibc-0.194/kinit/kinit.c 2005-01-05 01:38:30.740191320 -0700 @@ -168,7 +168,7 @@ for (i = 1; i < argc; i+...
2020 Jun 01
3
[PATCH v2v 0/2] v2v: nbdkit: Don't use password=- parameter.
Part 2 fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1842440 Actually this fix on its own should be sufficient, but probably we want the nbdkit fixes too. Note this uses actual OCaml 4.05 features! ("let open" and the Unix.tcgetattr functions). I checked that both features are available on RHEL 7's OCaml. Rich.
2005 Jan 05
1
[PATCH] kinit/kinit.c
...I believe that should be "/root" and "/root/old_root". * chdir("/") is recommended after pivot_root() * init_argv[0] isn't set properly to the basename pointed to by char *s - this fix also eliminates six lines of unecessary code and improves readability by using get_arg(). --- klibc-0.194/kinit/kinit.c.orig 2005-01-05 15:40:15.468305608 -0700 +++ klibc-0.194/kinit/kinit.c 2005-01-05 15:41:44.400785816 -0700 @@ -246,8 +251,9 @@ do_ipconfig(cmdc, cmdv); check_path("/root"); - check_path("/old_root"); do_mounts(cmdc, cmdv); + /* do_mounts...
2011 Nov 22
0
[PATCH] kinit: Add ability to mount filesystems via /etc/fstab or cmdline
...ck(ent->mnt_fsname, + ent->mnt_dir, + ent->mnt_type, + 0, + ent->mnt_opts)) { + fprintf(stderr, "Skipping failed mount '%s'\n", + ent->mnt_fsname); + } + } + return 0; +} + int do_mounts(int argc, char *argv[]) { const char *root_dev_name = get_arg(argc, argv, "root="); const char *root_delay = get_arg(argc, argv, "rootdelay="); const char *load_ramdisk = get_arg(argc, argv, "load_ramdisk="); dev_t root_dev = 0; + int err; + FILE *fp; dprintf("kinit: do_mounts\n"); @@ -241,6 +327,22 @@ int d...
2019 Sep 20
0
[PATCH v4 01/12] v2v: Factor out the nbdkit VDDK code into a new module.
...parts of the incredibly long nbdkit - * command line which don't change between disks. + (* It probably never happens that the server name can be missing + * from the libvirt URI, but we need a server name to pass to + * nbdkit, so ... *) - let args = - let add_arg, get_args = - let args = ref [] in - let add_arg a = List.push_front a args in - let get_args () = List.rev !args in - add_arg, get_args in - - (* It probably never happens that the server name can be missing - * from the libvirt URI, but we need a server name to pass...
2019 Apr 08
12
[PATCH 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
This series (except the last one) changes virt-v2v to use nbdkit for several input modes: -i vmx -it vddk: No change in functionality, as this already uses nbdkit-vddk-plugin, but the code is refactored for the other modes to use. -i libvirtxml: Use nbdkit-curl-plugin instead of qemu curl. vCenter: Use nbdkit-curl-plugin instead of qemu curl. xen: Use nbdkit-ssh-plugin instead of qemu
2019 Jul 19
12
[PATCH v3 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00115.html This also has links to earlier versions. v3: - The 01/11 patch in v2 included a bunch of unnecessary plus one necessary change to how input_password is passed around. I moved the necessary change into the final patch (implementing SSH password authentication) and dropped the rest. - The 01/11
2019 Sep 20
15
[PATCH v4 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
v3 posted here: https://www.redhat.com/archives/libguestfs/2019-July/msg00200.html v4: - The first patch in the v3 series was just a trivial doc whitespace fix so I pushed it. - There's a new patch using the nbdkit-retry-filter. This is not actually upstream in nbdkit but we know enough about how it will work. - Rebased against master and reran the tests. Rich.
2019 Jul 11
11
[PATCH v2 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
Originally posted here: https://www.redhat.com/archives/libguestfs/2019-April/thread.html#00054 https://www.redhat.com/archives/libguestfs/2019-April/msg00076.html https://www.redhat.com/archives/libguestfs/2019-April/msg00126.html This is a rebase on top of current master branch with no other changes. The first patch in the old series was pushed a while back, and the last "TEMPORARY"
2019 Apr 09
1
[PATCH] v2v: Implement the --bandwidth* options to control network bandwidth.
This is built on top of the following patch series: https://www.redhat.com/archives/libguestfs/2019-April/msg00054.html Rich.
2005 Jan 05
1
[PATCH] kinit/nfsmount.c path from bootp
...rig 2005-01-05 04:13:47.043897880 -0700 +++ klibc-0.194/kinit/nfsroot.c 2005-01-05 04:13:09.316633296 -0700 @@ -66,34 +66,21 @@ const int len = 1024; struct netdev *dev; char *path = NULL; + char *dev_bootpath = NULL; char root[len]; char *x, *opts; int ret = 0; int a; - if ((path = get_arg(argc, argv, "nfsroot=")) == NULL) { - path = (char *) "/tftpboot/%s"; - } - - if (*path == '\0') { - fprintf(stderr, "Root-NFS: no path\n"); - exit(1); - } - a = 1; - if ((opts = strchr(path, ',')) != NULL) { - *opts++ = '\0'; - argv[a...
2016 Jan 17
1
[PATCH klibc] run-init: Add dry-run mode
..."init not executable"; + return NULL; /* Success */ + } } --- a/usr/kinit/kinit.c +++ b/usr/kinit/kinit.c @@ -304,7 +304,7 @@ int main(int argc, char *argv[]) init_argv[0] = strrchr(init_path, '/') + 1; errmsg = run_init("/root", "/dev/console", - get_arg(cmdc, cmdv, "drop_capabilities="), + get_arg(cmdc, cmdv, "drop_capabilities="), false, init_path, init_argv); /* If run_init returned, something went bad */ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: appl...
2020 Sep 24
4
[PATCH v2v 0/4] v2v: vcenter: Implement cookie scripts.
Patch 1 was previously posted here: https://www.redhat.com/archives/libguestfs/2020-June/msg00086.html to handle this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1848862 I was able to observe this bug and for me at least disabling readahead seems to cure it. Patches 2 and 3 are simplifications, removing a now-undocumented feature of virt-v2v-copy-to-local and thus simplifying greatly the
2012 Mar 08
3
[PATCH 0/3] kinit: Allow mount options
This patch series allows user-specified mount commands to be sent in via kernel command line ("kinit_mount=...") or via an embedded /etc/fstab file. The first patch is a cleanup of a patch sent last November by San Mehat (http://web.archiveorange.com/archive/v/EazJNBMORV2U7E0coh5h); the next two are small improvements or bug fixes.
2012 May 04
2
[PATCH] run-init: add drop_capabilities support
...endif /* KINIT_CAPABILITIES_H */ diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c index 8ea0da5..523c92b 100644 --- a/usr/kinit/kinit.c +++ b/usr/kinit/kinit.c @@ -284,8 +284,6 @@ int main(int argc, char *argv[]) check_path("/root"); do_mounts(cmdc, cmdv); - drop_capabilities(get_arg(cmdc, cmdv, "drop_capabilities=")); - if (mnt_procfs) { umount2("/proc", 0); mnt_procfs = 0; @@ -305,7 +303,9 @@ int main(int argc, char *argv[]) init_argv[0] = strrchr(init_path, '/') + 1; - errmsg = run_init("/root", "/dev/console", in...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...dle_console_input, + 4, handle_console_output); + dev->priv = malloc(sizeof(struct console_abort)); + ((struct console_abort *)dev->priv)->count = 0; + verbose("device %p@%p: console\n", dev->desc, + (void *)(dev->desc->pfn * getpagesize())); +} + +static const char *get_arg(const char *arg, const char *prefix) +{ + if (strncmp(arg, prefix, strlen(prefix)) == 0) + return arg + strlen(prefix); + return NULL; +} + +static u32 handle_device(int fd, unsigned long dma, unsigned long addr, + struct devices *devices) +{ + struct device *i; + u32 *lenp; + struct iovec iov[...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...dle_console_input, + 4, handle_console_output); + dev->priv = malloc(sizeof(struct console_abort)); + ((struct console_abort *)dev->priv)->count = 0; + verbose("device %p@%p: console\n", dev->desc, + (void *)(dev->desc->pfn * getpagesize())); +} + +static const char *get_arg(const char *arg, const char *prefix) +{ + if (strncmp(arg, prefix, strlen(prefix)) == 0) + return arg + strlen(prefix); + return NULL; +} + +static u32 handle_device(int fd, unsigned long dma, unsigned long addr, + struct devices *devices) +{ + struct device *i; + u32 *lenp; + struct iovec iov[...
2006 Jul 11
0
[rfc] standalone kinit/resume
..."resume.h" -#ifndef CONFIG_PM_STD_PARTITION -# define CONFIG_PM_STD_PARTITION "" -#endif +char *progname; -int do_resume(int argc, char *argv[]) +static __noreturn usage(void) { - const char *resume_file = CONFIG_PM_STD_PARTITION; - const char *resume_arg; - - resume_arg = get_arg(argc, argv, "resume="); - resume_file = resume_arg ? resume_arg : resume_file; - /* No resume device specified */ - if (!resume_file[0]) - return 0; - - /* Fix: we either should consider reverting the device back to - ordinary swap, or (better) put that code into swapon */ - /* Noresu...
2019 Jan 18
0
[klibc:master] run-init: Add dry-run mode
...t a/usr/kinit/kinit.c b/usr/kinit/kinit.c index 523c92b..de03c2d 100644 --- a/usr/kinit/kinit.c +++ b/usr/kinit/kinit.c @@ -304,7 +304,7 @@ int main(int argc, char *argv[]) init_argv[0] = strrchr(init_path, '/') + 1; errmsg = run_init("/root", "/dev/console", - get_arg(cmdc, cmdv, "drop_capabilities="), + get_arg(cmdc, cmdv, "drop_capabilities="), false, init_path, init_argv); /* If run_init returned, something went bad */ diff --git a/usr/kinit/run-init/run-init.c b/usr/kinit/run-init/run-init.c index 2147d06..a14ce7c 100644 ---...