Displaying 20 results from an estimated 1000 matches similar to: "[PATCH] Fix errno check in readdir in devsparts.c"
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 Jan 19
3
[PATCH 1/2] daemon: Fix part-to-dev when the partition name includes p<N>.
From: Pino Toscano <ptoscano@redhat.com>
If the device name ends with a number, Linux uses partition names of
the form <device>p<N>. Handle this case by knocking off the 'p'
character.
---
daemon/devsparts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index 5862ae2..b764f63 100644
--- a/daemon/devsparts.c
+++
2009 Aug 03
1
[PATCH] Recognise cd-rom devices in devsparts.c
Also:
* Un-duplicate device detection code by creating a common mapping function.
* Add some more comments.
---
daemon/devsparts.c | 209 +++++++++++++++++++++++++++++-----------------------
1 files changed, 116 insertions(+), 93 deletions(-)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index 33579ba..0e056a1 100644
--- a/daemon/devsparts.c
+++ b/daemon/devsparts.c
@@ -29,57 +29,38 @@
2017 Jan 19
0
[PATCH 2/2] daemon: Return MD partitions in guestfs_list_partitions (RHBZ#1414510).
From: Pino Toscano <ptoscano@redhat.com>
---
daemon/devsparts.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index b764f63..852ee99 100644
--- a/daemon/devsparts.c
+++ b/daemon/devsparts.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it,
as that string would have been owned by the stringbuf.
Adapt few places to this behaviour.
---
daemon/btrfs.c | 4 +---
daemon/devsparts.c | 8 ++++----
daemon/guestfsd.c | 1 +
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 9b52aa8..d70565a 100644
---
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
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);
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
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);
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
2017 Apr 19
2
[PATCH v2] daemon: Remove use of fixed-size stack buffers.
v1 -> v2:
- Fixes as suggested by Pino.
Rich.
2017 Feb 14
4
[PATCH v2 0/2] GCC 7: Misc fixes
v1 -> v2:
- Use intprops macro suggested by danpb.
Rich.
2011 Jun 09
15
[PATCH 00/13] Fix errors found using Coverity static analyzer.
I ran the Coverity static analyzer[1] on libguestfs, and fixed many
errors as a result.
Coverity found some errors in gnulib, but it doesn't seem to be worth
following those up since the version of gnulib we are using is so old.
There are a couple more errors (possibly 1 false-positive) which I'm
going to send in a separate email.
BTW all the errors found by Coverity were in the daemon
2017 Feb 14
2
[PATCH 1/2] GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form:
qemu-speed-test.c: In function 'main':
qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
usage (EXIT_SUCCESS);
^~~~~~~~~~~~~~~~~~~~
qemu-speed-test.c:155:5: note: here
default:
^~~~~~~
---
builder/index-validate.c | 2 +-
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
more daemon codes covered
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
daemon/debug.c | 2 +-
daemon/devsparts.c | 2 +-
daemon/guestfsd.c | 6 +++---
daemon/labels.c | 4 ++--
daemon/ldm.c | 16 ++++++++--------
daemon/md.c | 10 +++++-----
daemon/mkfs.c | 2 +-
daemon/parted.c | 8 ++++----
daemon/statvfs.c | 8 ++++----
daemon/sync.c
2018 Jan 22
0
[RFC PATCH v1 2/3] daemon: devsparts: add is_partitioned_device function
The function takes one argument - device path (e.g. /dev/sda) and returns true if device contains partition(s) or false otherwise. The function look in /sys/block/<device>/ for entries starting with <device>, eg. /sys/block/sda/sda1.
---
daemon/devsparts.ml | 14 ++++++++++++++
daemon/devsparts.mli | 1 +
2 files changed, 15 insertions(+)
diff --git a/daemon/devsparts.ml
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
2018 Jan 23
2
Re: [RFC PATCH v1 3/3] daemon: list-filesystems: Don't list partitioned md devices
On Tue, Jan 23, 2018 at 12:44:13AM +0200, Mykola Ivanets wrote:
> Filter partitioned md devices out the same way as partitioned physical devices are filtered out
> ---
> daemon/listfs.ml | 22 +++++++++-------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/daemon/listfs.ml b/daemon/listfs.ml
> index 370ffb4..dc424f5 100644
> ---
2016 Mar 02
1
[PATCH] daemon: do not fail list-disk-labels w/o labels set
If there are no labels set for the disks, the directory with the
symlinks will not even exists, causing list-disk-labels to fail with
ENOENT. In this situation, act as if the directory was there, but
empty.
---
daemon/devsparts.c | 7 +++++++
generator/actions.ml | 12 ++++++++++++
2 files changed, 19 insertions(+)
diff --git a/daemon/devsparts.c b/daemon/devsparts.c
index 7b92bf6..7c690f8