search for: read_cmdlin

Displaying 20 results from an estimated 23 matches for "read_cmdlin".

Did you mean: read_cmdline
2016 Jun 14
1
[PATCH supermin] init: Delete initramfs files before chrooting into the appliance.
...Red Hat Inc. + * Copyright (C) 2009-2016 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 @@ -80,6 +80,7 @@ static void mount_proc (void); static void print_uptime (void); static void read_cmdline (void); static void insmod (const char *filename); +static void delete_initramfs_files (void); static void show_directory (const char *dir); static char cmdline[1024]; @@ -264,9 +265,12 @@ main () exit (EXIT_FAILURE); } + if (!quiet) + fprintf (stderr, "supermin: deleting i...
2012 Jun 12
1
[PATCH] Add virtio-scsi support to febootstrap.
This patch is the minimum possible to add virtio-scsi support to febootstrap. Problem: SCSI devices are detected asynchronously after the Linux kernel module is loaded. The usual solutions to this involve scsi_wait_scan (deprecated apparently) or udev. However febootstrap doesn't use udev, and adding it is a ton of work with a very uncertain outcome. So the minimum possible change is to
2015 Jun 23
0
[PATCH 3/7] daemon: Add --cmdline option for testing.
...ot;, + long_options[option_index].name, option_index); + break; + /* The -r flag is used when running standalone. It changes * several aspects of the daemon. */ @@ -210,7 +223,8 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - cmdline = read_cmdline (); + if (!cmdline) + cmdline = read_cmdline (); /* Set the verbose flag. */ verbose = verbose || diff --git a/daemon/guestfsd.pod b/daemon/guestfsd.pod index 1ed31a9..96bbbd6 100644 --- a/daemon/guestfsd.pod +++ b/daemon/guestfsd.pod @@ -50,6 +50,12 @@ removed. Display brief help....
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2: - If we split out the init program into a separate init/ directory, that makes it much easier to build against an alternate libc. I tried to build against uClibc, but uClibc requires an entire build chain, which looked like it was going to be a massive ballache. Rich.
2016 Mar 17
9
[PATCH supermin 0/5] Make supermin mini-initrd quieter and faster.
Various patches to make supermin quieter. By outputting fewer messages on the fast path, we use the slow emulated UART less, and this improves boot times. Also remove some kernel modules that we cannot or should not be using, which also improves boot times. Rich.
2016 Feb 17
0
[PATCH supermin v2 4/4] init: Debug which libc is in use.
...PACKAGE_VERSION +#if defined(__dietlibc__) + " dietlibc" +#elif defined(__GLIBC__) + " glibc" +#elif defined(__NEWLIB_H__) + " newlib" +#elif defined(__UCLIBC__) + " uClibc" +#endif "\n"); read_cmdline (); -- 2.5.0
2012 Sep 03
1
[PATCH] daemon: remove call to obsolete udevsettle
...aepfle.de> diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index e6d5fde..0db56e4 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -54,7 +54,6 @@ #include "daemon.h" GUESTFSD_EXT_CMD(str_udevadm, udevadm); -GUESTFSD_EXT_CMD(str_udevsettle, udevsettle); static char *read_cmdline (void); @@ -1287,16 +1286,9 @@ random_name (char *template) * * Use 'udevadm settle' after certain commands, but don't be too * fussed if it fails. - * - * 'udevsettle' was the old name for this command (RHEL 5). This was - * deprecated in favour of 'udevadm settle...
2015 May 14
1
[PATCH] When calling getline first time, initialize length to zero.
...+306,7 @@ partition_parent (dev_t part_dev) { CLEANUP_FCLOSE FILE *fp = NULL; CLEANUP_FREE char *path = NULL, *content = NULL; - size_t len; + size_t len = 0; unsigned parent_major, parent_minor; if (asprintf (&path, "/sys/dev/block/%d:%d/../dev", @@ -521,7 +521,7 @@ read_cmdline (void) { CLEANUP_FCLOSE FILE *fp = NULL; char *ret = NULL; - size_t len; + size_t len = 0; fp = fopen ("/proc/cmdline", "re"); if (fp == NULL) { -- 2.3.1
2017 Apr 25
1
[PATCH supermin v2] init: Support root=UUID=... to specify the appliance disk by volume UUID.
v1 -> v2: - I fixed the end condition of the loop in parse_root_uuid. - Retested. Didn't change the busy wait loop into a function or macro, as per discussion on IRC. Rich.
2017 Apr 19
1
[PATCH supermin] init: Support root=UUID=... to specify the appliance disk by volume UUID.
...ddfc437..3885cc6 100644 --- a/init/init.c +++ b/init/init.c @@ -28,6 +28,7 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> +#include <ctype.h> #include <inttypes.h> #include <limits.h> #include <unistd.h> @@ -89,6 +90,11 @@ static void read_cmdline (void); static void insmod (const char *filename); static void delete_initramfs_files (void); static void show_directory (const char *dir); +static void parse_root_uuid (const char *uuid, unsigned char *raw_uuid); +static int hexdigit (char d); +static int find_fs_uuid (const unsigned char *raw...
2012 Dec 13
2
[PATCH 1/2] daemon: NFC Use symbolic names in commandrvf
...e. --- daemon/guestfsd.c | 79 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 5c84849..4b3dd5f 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -66,6 +66,10 @@ static char *read_cmdline (void); # define O_CLOEXEC 0 #endif +/* For improved readability dealing with pipe arrays */ +#define PIPE_READ 0 +#define PIPE_WRITE 1 + /* If root device is an ext2 filesystem, this is the major and minor. * This is so we can ignore this device from the point of view of the * user, eg....
2015 Jun 25
13
[PATCH v2 0/9] Better testing of the guestfsd daemon.
In v2: - Kernel command line parsing now moved to the appliance. - In the captive daemon test, the daemon cleanly shuts down on exit. - Add another btrfs test. Rich.
2016 Feb 17
0
[PATCH supermin v2 1/4] init: Uncompress modules before adding them to the mini initrd.
...,12 +94,6 @@ main () print_uptime (); fprintf (stderr, "supermin: ext2 mini initrd starting up: " PACKAGE_VERSION -#ifdef HAVE_ZLIB_STATIC - " zlib" -#endif -#ifdef HAVE_LZMA_STATIC - " xz" -#endif "\n"); read_cmdline (); @@ -283,20 +269,6 @@ main () exit (EXIT_FAILURE); } -#if HAVE_LZMA_STATIC -static int -ends_with (const char *str, const char *suffix) -{ - if (!str || !suffix) - return 0; - size_t lenstr = strlen (str); - size_t lensuffix = strlen (suffix); - if (lensuffix > lenstr) - ret...
2016 Feb 17
2
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
Allow an alternate libc, such as dietlibc, to be used for the init binary in the supermin appliance. Rich.
2009 Sep 24
1
enabling more syntax-checks
...n/guestfsd.c +++ b/daemon/guestfsd.c @@ -34,10 +34,10 @@ #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> -#include <ctype.h> #include <signal.h> #include <printf.h> +#include "c-ctype.h" #include "daemon.h" static char *read_cmdline (void); @@ -835,7 +835,7 @@ print_shell_quote (FILE *stream, const struct printf_info *info ATTRIBUTE_UNUSED, const void *const *args) { -#define SAFE(c) (isalnum((c)) || \ +#define SAFE(c) (c_isalnum((c)) || \ (c) == '/' |...
2013 Aug 19
5
[PATCH v2 0/3 supermin] URPMI & xz support.
Joseph, Please try my modified versions of these patches. These are compile-tested on Fedora and they don't break any existing functionality, but I don't have either urpmi nor a statically-linked xz so I cannot fully test them. I have also fixed detection of zlib (2/3). Rich.
2015 Jun 23
10
[PATCH 0/7] Better testing of the guestfsd daemon.
Currently we are unable to properly run guestfsd (the daemon) under valgrind. Attempts to run valgrind inside the appliance have not been successful (see patch 1/7). However we desperately need better valgrind coverage of the daemon, particularly because it is doing a lot of complex parsing of program output. This has been a problem for a long time. A better way to attack this problem is to
2013 Aug 09
4
[PATCH v2 0/4] Experimental User-Mode Linux backend.
v1 was here: https://www.redhat.com/archives/libguestfs/2013-August/msg00005.html This now works, to some extent. The main problem now is that devices are named /dev/ubd[a-] which of course confuses everything. I'm thinking it may be easier to add a udev rule to rename them. Rich.
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...it (0); + exit (EXIT_SUCCESS); default: fprintf (stderr, "guestfsd: unexpected command line option 0x%x\n", c); - exit (1); + exit (EXIT_FAILURE); } } if (optind < argc) { usage (); - exit (1); + exit (EXIT_FAILURE); } cmdline = read_cmdline (); @@ -190,7 +190,7 @@ main (int argc, char *argv[]) vmchannel = strndup (p + 18, len); if (!vmchannel) { perror ("strndup"); - exit (1); + exit (EXIT_FAILURE); } } @@ -204,7 +204,7 @@ main (int argc, char *argv[]) vmchannel = s...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...rameters"; - default: - return strerror(err); - } -} - -/* Leave this enabled for now. When we get more confident in the boot - * process we can turn this off or make it configurable. - */ -#define verbose 1 - -static void mount_proc (void); -static void print_uptime (void); -static void read_cmdline (void); -static void insmod (const char *filename); -static void show_directory (const char *dir); - -static char cmdline[1024]; -static char line[1024]; - -int -main () -{ - mount_proc (); - - print_uptime (); - fprintf (stderr, "supermin: ext2 mini initrd starting up: " -...