similar to: [PATCH 4/4] daemon: simplify string allocation

Displaying 20 results from an estimated 8000 matches similar to: "[PATCH 4/4] daemon: simplify string allocation"

2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
After the previous refactoring, we are able to link the daemon to common/utils, and also remove some of the "duplicate" functions that the daemon carried ("duplicate" in quotes because they were often not exact duplicates). Also this removes the duplicate reimplementation of (most) cleanup functions in the daemon, since those are provided by libutils now. It also allows us in
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
From: "Richard W.M. Jones" <rjones at redhat.com> Callers are supposed to use the availability API to check for functions that may not be available in particular builds of libguestfs. If they don't do this, currently they tend to get obscure error messages, eg: libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory This commit changes the error
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
Some of the oldest and most core APIs, reimplemented. This also moves the strange ‘mount_vfs_nochroot’ function into btrfs.c. --- daemon/Makefile.am | 2 + daemon/btrfs.c | 43 ++++++++++++++++++++ daemon/daemon.h | 6 --- daemon/mount.c | 99 ----------------------------------------------- daemon/mount.ml | 62 +++++++++++++++++++++++++++++
2016 Mar 29
2
[PATCH] renamed daemon/tsk.c to daemon/sleuthkit.c
In order to support the new features I am renaming the file with a better name. The file sleuthkit.c will contain the code depending on the sleuthkit package. The original tsk.c file will contain the logic built using libtsk which is the sleuthkit core library. This patch is ready for review. Code available at: https://github.com/noxdafox/libguestfs/tree/sleuthkit_rename Signed-off-by: Matteo
2017 Apr 19
1
[PATCH] daemon: Remove use of fixed-size stack buffers.
GCC 7 complains that the fixed size buffers are not large enough (at least in theory) when using ‘-O3 -mtune=broadwell’. --- daemon/devsparts.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 584e7d8b8..eac79197e 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -125,13 +125,16 @@ foreach_block_device
2017 Jul 14
0
[PATCH 05/27] daemon: Reimplement several devsparts APIs in OCaml.
The reimplemented APIs are: * list_devices * list_partitions * part_to_dev * part_to_partnum * is_whole_device --- daemon/Makefile.am | 2 + daemon/daemon.h | 3 - daemon/devsparts.c | 257 ---------------------------------------------- daemon/devsparts.ml | 109 ++++++++++++++++++++ daemon/devsparts.mli | 25 +++++ daemon/guestfsd.c | 75
2020 Mar 09
4
[PATCH v3 0/3] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Changes from v2: - dropped patch #1, as it was applied already (was a real bugfix) - rebased on master Pino Toscano (3): Revert "Revert "daemon: implement OptString for OCaml APIs"" daemon: move augeas
2017 Apr 19
0
[PATCH v2] daemon: Remove use of fixed-size stack buffers.
GCC 7 complains that the fixed size buffers are not large enough (at least in theory) when using ‘-O3 -mtune=broadwell’. --- daemon/devsparts.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 584e7d8b8..82467b92f 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -125,13 +125,16 @@ foreach_block_device
2020 Jan 09
5
[PATCH v2 0/4] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Pino Toscano (4): daemon: fix/enhance error reporting of Augeas exceptions Revert "Revert "daemon: implement OptString for OCaml APIs"" daemon: move augeas APIs to OCaml daemon: drop usage of C
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
Declare most of the stringsbuf as CLEANUP_FREE_STRINGSBUF, so they are freed completely on stack unwind: use take_stringsbuf() in return places to take away from the stringsbuf its content, and remove all the manual calls to free_stringslen (no more needed now). This requires to not use free_stringslen anymore on failure in the helper functions of stringsbuf, which now leave the content as-is
2020 Feb 20
0
[PATCH] daemon: Translate device names if Linux device ordering is unstable (RHBZ#1804207).
Linux from around 5.6 now enumerates individual disks in any order (whereas previously it enumerated only drivers in parallel). This means that /dev/sdX ordering is no longer stable - in particular we cannot be sure that /dev/sda inside the guest is the first disk that was attached to the appliance, /dev/sdb the second disk and so on. However we can still use SCSI PCI device numbering as found
2019 May 30
5
[PATCH 0/5] RFC: switch augeas APIs to OCaml
This synchronizes the embedded ocaml-augeas copy, and reimplements the augeas APIs using it (dropping all the C code). The behaviour seems unchanged, although I may have not tested all the various corner cases. Pino Toscano (5): common/mlaugeas: Synchronize with latest ocaml-augeas daemon: fix/enhance error reporting of Augeas exceptions Revert "Revert "daemon: implement
2016 Mar 02
0
[PATCH] daemon: ntfs: fix format strings
Use PRIi64 as format string for int64_t, so it builds and works fine also on 32bit. Also switch from asprintf_nowarn to asprintf, since no custom formats (eg %Q, %R) are used. --- daemon/ntfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/ntfs.c b/daemon/ntfs.c index 92088f7..e555c63 100644 --- a/daemon/ntfs.c +++ b/daemon/ntfs.c @@ -282,8 +282,8 @@
2016 Mar 07
2
[PATCH v2] Use less stack.
GCC has two warnings related to large stack frames. We were already using the -Wframe-larger-than warning, but this reduces the threshold from 10000 to 5000 bytes. However that warning only covers the static part of frames (not alloca). So this change also enables -Wstack-usage=10000 which covers both the static and dynamic usage (alloca and variable length arrays). Multiple changes are made
2016 Mar 29
0
[PATCH 1/2] rename icat API to download_inode
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- daemon/sleuthkit.c | 79 ++++++++++++++++++++++++++++------------------------ generator/actions.ml | 6 ++-- 2 files changed, 47 insertions(+), 38 deletions(-) diff --git a/daemon/sleuthkit.c b/daemon/sleuthkit.c index 0fe1250..536febb 100644 --- a/daemon/sleuthkit.c +++ b/daemon/sleuthkit.c @@ -29,55 +29,55 @@ #include
2016 Aug 08
1
[PATCH] sleuthkit code cleanup
Small cosmetic changes. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- daemon/sleuthkit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/sleuthkit.c b/daemon/sleuthkit.c index ce738e3..e642731 100644 --- a/daemon/sleuthkit.c +++ b/daemon/sleuthkit.c @@ -47,7 +47,8 @@ do_download_inode (const mountable_t *mountable, int64_t inode) } /*
2017 Feb 14
0
[PATCH 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2018 May 03
1
[PATCH] daemon: fix memory allocation and leaks in OCaml stubs
Use the cleanup handlers to free the structs (and list of structs) in case their OCaml->C transformation fails for any reason; use calloc() to not try to use uninitialized memory. In case of lists, avoid allocating the memory for the array if there are no elements, since the returned pointer in that case is either NULL, or a free()-only pointer; also, set the list size only after the array is
2017 Feb 14
0
[PATCH v2 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2013 Feb 07
1
[PATCH] New API: is_whole_device
--- daemon/devsparts.c | 27 +++++++++++++++++++++++++++ generator/actions.ml | 17 +++++++++++++++++ src/MAX_PROC_NR | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 9a2ce9a..1939f2a 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -245,6 +245,33 @@ do_part_to_partnum (const char *part) } int