search for: device_name_translation

Displaying 17 results from an estimated 17 matches for "device_name_translation".

2020 Feb 20
0
[PATCH] daemon: Translate device names if Linux device ordering is unstable (RHBZ#1804207).
...ons(+), 10 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 170fb2537..24cf8585d 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -215,6 +215,8 @@ extern void notify_progress_no_ratelimit (uint64_t position, uint64_t total, con /* device-name-translation.c */ extern char *device_name_translation (const char *device); +extern void device_name_translation_init (void); +extern void device_name_translation_free (void); extern char *reverse_device_name_translation (const char *device); /* stubs.c (auto-generated) */ diff --git a/daemon/device-name-translation.c b/daemon/device-name-translat...
2020 Mar 05
5
[PATCH v2 0/4] daemon: Translate device names if Linux device is unstable (RHBZ#1804207).
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00220.html This patch series is a little bit better. It's still a bit of a hack. The _real_ fix for this is outlined in the TODO file (see patch 1) but that requires a lot more work than we could do before 1.42 is released, unless we delay 1.42 for a lot longer. I'm hoping with this to have something which works
2009 Nov 18
1
[PATCH] daemon/RHEL: Choose correct udev settle script.
...s commit chooses the correct program to run. --- daemon/guestfsd.c | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index db0bff9..9375ede 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -976,5 +976,25 @@ device_name_translation (char *device, const char *func) void udev_settle (void) { - command (NULL, NULL, "/sbin/udevadm", "settle", NULL); + static int which_prog = 0; + + if (which_prog == 0) { + if (access ("/sbin/udevsettle", X_OK) == 0) + which_prog = 2; + else if (acces...
2009 Dec 18
1
[PATCH] daemon: Work around udevsettle issue (RHBZ#548121).
...udevsettle issue (RHBZ#548121). --- daemon/guestfsd.c | 30 +++++++++--------------------- 1 files changed, 9 insertions(+), 21 deletions(-) diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 520a4a4..0fc0128 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -1038,31 +1038,19 @@ device_name_translation (char *device, const char *func) * involved. eg. You can create or remove some device, but the /dev * device node won't appear until some time later. This means that * you get an error if you run one command followed by another. + * * Use 'udevadm settle' after certain command...
2010 Mar 26
1
[PATCH] appliance: Set $PATH instead of hard-coding paths to binaries everywhere.
...const char *argv[] = { - "/sbin/blockdev", + "blockdev", switc, NULL, NULL, diff --git a/daemon/daemon.h b/daemon/daemon.h index 777cf33..19dd69c 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -70,6 +70,8 @@ extern void trim (char *str); extern int device_name_translation (char *device, const char *func); +extern int prog_exists (const char *prog); + extern void udev_settle (void); /* This just stops gcc from giving a warning about our custom diff --git a/daemon/ext2.c b/daemon/ext2.c index c90ee05..3758f4e 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -43...
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code. It's all refactoring, there is no functional change. Rich.
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
..._receive (); \ - reply_with_error ("%s: %s: device not found", __func__, path); \ - return; \ - } \ (path_out) = device_name_translation ((path)); \ if ((path_out) == NULL) { \ const int err = errno; \ @@ -86,7 +81,7 @@ */ #define REQUIRE_ROOT_OR_RESOLVE_DEVICE(path,path_out,is_filein) \ do { \...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623 The first two patches are cleanups. The third patch changes the way that we handle Device and Dev_or_Path parameters so that a parameter marked as such can really only contain a block device name (and not, for instance, a chardev). Using a chardev here caused hangs in the API. The next two patches fix API usage to conform to this new stricter
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...uot;, 5)) { \ reply_with_error ("%s: %s: expecting a device name", __func__, (path)); \ fail_stmt; \ } \ diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index d16826f..61a6236 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -945,7 +945,7 @@ device_name_translation (char *device, const char *func) } /* If the name begins with "/dev/sd" then try the alternatives. */ - if (strncmp (device, "/dev/sd", 7) != 0) + if (STRNEQLEN (device, "/dev/sd", 7)) goto error; device[5] = 'h'; /* /dev/hd (old IDE driver)...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
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.
2016 Mar 07
2
[PATCH v2] Use less stack.
...+ reply_with_perror ("asprintf"); + return NULL; + } r = command (&out, &err, str_findfs, arg, NULL); if (r == -1) { diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 4bc5fd4..aa4c728 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -992,8 +992,7 @@ device_name_translation (const char *device) int parse_btrfsvol (const char *desc_orig, mountable_t *mountable) { - size_t len = strlen (desc_orig); - char desc[len+1]; + CLEANUP_FREE char *desc = NULL; CLEANUP_FREE char *device = NULL; const char *volume = NULL; char *slash; @@ -1001,10 +1000,14 @@ parse_b...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
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’