Displaying 20 results from an estimated 29 matches for "guestfs_int_error_errno".
2020 Oct 09
2
Re: [PATCH v3 8/8] lib/canonical-name.c: Hide EINVAL error from underlying API call.
...afe_strdup (g, device);
> + if (ret == NULL) {
> + if (guestfs_last_errno (g) == EINVAL)
> + ret = safe_strdup (g, device);
> + else
> + /* Make sure the original error gets pushed through the
> + * error handlers.
> + */
> + guestfs_int_error_errno (g, guestfs_last_errno (g),
> + "%s", guestfs_last_error (g));
> + }
> }
> else
> ret = safe_strdup (g, device);
>
> ---
>
> Current upstream:
>
> $ guestfish scratch 1M : run : canonical-device-name "/...
2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...ree (g->last_error);
- g->last_error = strdup (msg);
- g->last_errnum = errnum;
+ struct error_data *error_data = get_error_data (g);
+
+ free (error_data->last_error);
+ error_data->last_error = strdup (msg);
+ error_data->last_errnum = errnum;
}
/**
@@ -166,6 +290,7 @@ guestfs_int_error_errno (guestfs_h *g, int errnum, const char *fs, ...)
va_list args;
CLEANUP_FREE char *msg = NULL;
int err;
+ struct error_data *error_data = get_error_data (g);
va_start (args, fs);
err = vasprintf (&msg, fs, args);
@@ -177,7 +302,8 @@ guestfs_int_error_errno (guestfs_h *g, int err...
2015 Jun 06
0
[PATCH 3/5] threads: Use thread-local storage for errors.
...->last_errnum = errnum;
+ struct error_data *error_data = get_error_data (g);
+
+ free (error_data->last_error);
+ error_data->last_error = strdup (msg);
+ error_data->last_errnum = errnum;
}
/* Warning are printed unconditionally. We try to make these rare.
@@ -141,6 +265,7 @@ guestfs_int_error_errno (guestfs_h *g, int errnum, const char *fs, ...)
va_list args;
CLEANUP_FREE char *msg = NULL;
int err;
+ struct error_data *error_data = get_error_data (g);
va_start (args, fs);
err = vasprintf (&msg, fs, args);
@@ -152,7 +277,8 @@ guestfs_int_error_errno (guestfs_h *g, int err...
2020 Oct 09
3
Re: [PATCH v3 8/8] lib/canonical-name.c: Hide EINVAL error from underlying API call.
On Thu, Sep 17, 2020 at 01:40:04PM +0100, Richard W.M. Jones wrote:
>When guestfs_lvm_canonical_lv_name was called with a /dev/dm* or
>/dev/mapper* name which was not an LV then a noisy error would be
>printed. This would typically have happened with encrypted disks, and
>now happens very noticably when inspecting Windows BitLocker-
>encrypted guests.
>
>Using the modified
2020 Oct 09
0
Re: [PATCH v3 8/8] lib/canonical-name.c: Hide EINVAL error from underlying API call.
...last_errno (g) == EINVAL)
- ret = safe_strdup (g, device);
+ if (ret == NULL) {
+ if (guestfs_last_errno (g) == EINVAL)
+ ret = safe_strdup (g, device);
+ else
+ /* Make sure the original error gets pushed through the
+ * error handlers.
+ */
+ guestfs_int_error_errno (g, guestfs_last_errno (g),
+ "%s", guestfs_last_error (g));
+ }
}
else
ret = safe_strdup (g, device);
---
Current upstream:
$ guestfish scratch 1M : run : canonical-device-name "/dev/dm-999"
libguestfs: error: lvm_canonical_lv_na...
2020 Oct 09
0
Re: [PATCH v3 8/8] lib/canonical-name.c: Hide EINVAL error from underlying API call.
...f (ret == NULL) {
> > + if (guestfs_last_errno (g) == EINVAL)
> > + ret = safe_strdup (g, device);
> > + else
> > + /* Make sure the original error gets pushed through the
> > + * error handlers.
> > + */
> > + guestfs_int_error_errno (g, guestfs_last_errno (g),
> > + "%s", guestfs_last_error (g));
> > + }
> > }
> > else
> > ret = safe_strdup (g, device);
> >
> > ---
> >
> > Current upstream:
> >
> > $ gue...
2016 Mar 01
6
[PATCH 0/3] btrfs subvolumes display fix
Hey there!
Here are a few patches to fix unrelated things: one fixes the configure for older
ncurses releases having no pkg-config files. The other two are fixing what Richard
mentioned about guestfs subvolumes display
Cédric Bosdonnat (3):
configure: handle older version of ncurses
api: add mountable_device and mountable_subvolume
fish: fix btrfs subvolumes display in error case
2016 Mar 08
0
[PATCH v2 2/3] api: add mountable_device and mountable_subvolume
...*
+guestfs_impl_mountable_subvolume (guestfs_h *g, const char *mountable)
+{
+ CLEANUP_FREE_INTERNAL_MOUNTABLE struct guestfs_internal_mountable *mnt = NULL;
+
+ mnt = guestfs_internal_parse_mountable (g, mountable);
+ if (mnt == NULL || STREQ (mnt->im_volume, "")) {
+ guestfs_int_error_errno (g, EINVAL, "not a btrfs subvolume identifier");
+ return NULL;
+ }
+
+ return safe_strdup(g, mnt->im_volume);
+}
--
2.6.2
2016 Mar 08
0
[PATCH v3 2/3] api: add mountable_device and mountable_subvolume
...+}
+
+char *
+guestfs_impl_mountable_subvolume (guestfs_h *g, const char *mountable)
+{
+ CLEANUP_FREE_INTERNAL_MOUNTABLE struct guestfs_internal_mountable *mnt = NULL;
+
+ mnt = guestfs_internal_parse_mountable (g, mountable);
+ if (mnt == NULL || STREQ (mnt->im_volume, "")) {
+ guestfs_int_error_errno (g, EINVAL, "not a btrfs subvolume identifier");
+ return NULL;
+ }
+
+ return safe_strdup (g, mnt->im_volume);
+}
--
2.6.2
2016 Mar 08
7
[PATCH v2 0/3] btrfs subvolumes display fix
Hi all,
Here is version 2 of the patch series, including the changes for Pino's remarks.
Cédric Bosdonnat (3):
configure: handle older version of ncurses
api: add mountable_device and mountable_subvolume
fish: fix btrfs subvolumes display in error case
fish/options.c | 28 ++++++++++++++++++++++++++-
generator/actions.ml | 26 +++++++++++++++++++++++++
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here:
https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048
v2:
- Use a cleanup handler to release the lock.
- Rebase to upstream.
Note I have not fixed the problem(s) with error handling (patch 3).
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular
the problems with handling ^C are completely fixed.
Work still to be done before this can go upstream:
- Shutdown doesn't work properly if you exit the shell. At the
moment to exit you must do 'reboot -f'.
Future improvements:
- An escape sequence and escape commands that could be handled by
virt-rescue,
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015:
v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html
v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html
I have rebased and tidied up the patches, fixing a few spelling
mistakes, but they are broadly the same as before. I also ran all the
tests, which pass.
As with the previous versions, this makes a change to the API, where
you
2017 Mar 03
5
[PATCH 0/5] Fix virt-rescue.
This fixes the main issues in virt-rescue and is usable.
There are some enhancements which could be made (in follow up work):
- An escape sequence and escape commands that could be handled by
virt-rescue, eg. to shut down the appliance, mount or unmount
filesystems.
- `virt-rescue -i' could be implemented cleanly by performing the
right API calls before handing control to the
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a
quick 1.30 release soon, and save this patch, and also the extensive
changes proposed for the test suite[1], to after 1.30.
Currently it is not safe to use the same handle from multiple threads,
unless you implement your own mutexes. See:
http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads
These
2016 Dec 07
3
[PATCH v2 0/2] Improve inspection of /usr filesystems
Hi,
this patch series improves the way /usr filesystems are handled: tag
them appropriately, so later on we can find them and merge results they
contain directly back for the root filesystem.
Changes in v2:
- removed patches #1 and #2, already pushed
- drop patch #3, no more needed
- replace patch #4 with a better suggestion from Rich
- change if into assert in patch #5
Thanks,
Pino Toscano
2016 Mar 08
5
[PATCH v3 0/3] btrfs subvolumes display fix
Hi there,
Latest and greatest version including all new remarks from both Pino and Rich.
Cédric Bosdonnat (3):
configure: handle older version of ncurses
api: add mountable_device and mountable_subvolume
fish: fix btrfs subvolumes display in error case
fish/options.c | 28 ++++++++++++++++++++++++++-
generator/actions.ml | 26 +++++++++++++++++++++++++
m4/guestfs_libraries.m4
2017 Mar 03
6
[PATCH v2 0/6] Fix virt-rescue.
This supersedes the two previous patch series:
https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html
https://www.redhat.com/archives/libguestfs/2017-March/msg00046.html
Rich.
2017 Mar 04
7
[PATCH v3] Fix virt-rescue.
Version 3:
- Tidies up the code further.
- Implements correct handling of SIGTSTP and SIGCONT.
- Adds: ^] s - sync filesystems
- Adds: ^] z - suspend virt-rescue
Rich.
2016 Dec 06
9
[PATCH 0/5] Improve inspection of /usr filesystems
Hi,
this patch series improves the way /usr filesystems are handled: tag
them appropriately, so later on we can find them and merge results they
contain directly back for the root filesystem.
The series includes also a new private debug API, and its usage to fix
the resolution of /dev/mapper/.. devices found in fstab; without it,
LVM /usr filesystems are not recognized as belonging to their