Displaying 20 results from an estimated 7000 matches similar to: "[PATCH] error log: keep more calloc and its error messages match"
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did:
if (something_bad) {
perror (...);
exit (EXIT_FAILURE);
}
replace this with use of the error(3) function:
if (something_bad)
error (EXIT_FAILURE, errno, ...);
The error(3) function is supplied by glibc, or by gnulib on platforms
which don't have it, and is much more flexible than perror(3). Since
we already use error(3), there seems to be
2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
The device name is only used by guestfish (when using the -N option to
prepare drives). We constructed the device name very naively,
basically ‘sprintf ("/dev/sd%c", next_drive)’.
This stores the device index instead, and only constructs the device
name in guestfish. Also the device name is constructed properly using
guestfs_int_drive_name so it can cope with #drives > 26.
---
2012 Aug 06
1
[PATCH V2] virt-diff: add new virt-diff tool
add new virt-diff tool
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
Hi Rich,
It can work now, please give some comments. ;)
Cheers,
Wanlong Gao
cat/Makefile.am | 20 ++-
cat/virt-diff.c | 525 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
po/POTFILES | 1 +
3 files changed, 545 insertions(+), 1 deletion(-)
create mode 100644 cat/virt-diff.c
diff
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code from
this sub-module.
'--blocksize' will be a common for almost all libguestfs-based tools and
thus parameter description will be repeated all the time. Let's move
it into blocksize-option.pod
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds '--blocksize' command line option parsing and handling
for guestfish and other C-based tools which share the same code.
---
options/options.c | 13 ++++-
options/options.h | 125 +++++++++++++++++++++++++++-------------------
2 files changed, 86 insertions(+), 52 deletions(-)
diff --git a/options/options.c
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
There's a new syntax check rule from gnulib.
It requires that you write e.g., exit (EXIT_SUCCESS), not exit (0).
And the same for 1/EXIT_FAILURE and any other constants.
There were a lot of violations, including a few false positives,
so I started with the exemptions (see the .x-sc file below).
Then I converted the vast majority automatically, with this:
maint: use EXIT_SUCCESS and
2020 Aug 25
0
[nbdkit PATCH 3/5] api: Add nbdkit_string_intern helper
Implementing .default_export with its 'const char *' return is tricky
in the sh plugin: we must return dynamic memory, but must avoid a
use-after-free. And we don't want to change the return type of
.default_export to 'char *', because that would make our choice of
malloc()/free() part of the API, preventing either nbdkit or a plugin
from experimenting with an alternate
2020 Aug 27
0
[nbdkit PATCH v2 4/8] api: Add nbdkit_str[n]dup_intern helper
Implementing .default_export with its 'const char *' return is tricky
in the sh plugin: we must return dynamic memory, but must avoid a
use-after-free. And we don't want to change the return type of
.default_export to 'char *', because that would make our choice of
malloc()/free() part of the API, preventing either nbdkit or a plugin
from experimenting with an alternate
2015 Jun 17
0
Re: [PATCH] btrfs: keep calloc and its error message match
On Wednesday 17 June 2015 10:44:09 Chen Hanxiao wrote:
> commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d
> left some error messages unchanged.
That commit was about converting a couple of malloc+memset to calloc,
not about replacing messages in other parts. Hence, this note is wrong.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
> ---
> daemon/btrfs.c | 4
2015 Jun 17
2
[PATCH] btrfs: keep calloc and its error message match
commit 3f4ba2e98d21746723d291939ccc2e1f1526aa6d
left some error messages unchanged.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
---
daemon/btrfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 7b14bac..e8059db 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -479,7 +479,7 @@ do_btrfs_subvolume_list (const
2015 Jun 16
1
[PATCH] btrfs: use calloc instead of malloc+memset
Small optimization, and eases the code.
---
daemon/btrfs.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index f02acb1..7b14bac 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1723,12 +1723,11 @@ do_btrfs_balance_status (const char *path)
nlines = count_strings (lines);
- ret = malloc(sizeof *ret);
+ ret = calloc (1,
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
The existing APIs guestfs_stat, guestfs_lstat and guestfs_lstatlist
return a stat structure that contains atime, mtime and ctime fields
that store only the timestamp in seconds.
Modern filesystems can store timestamps down to nanosecond
granularity, and the ordinary glibc stat(2) wrapper will return these
in "hidden" stat fields:
struct timespec st_atim; /* Time of last
2018 Jan 16
0
[PATCH nbdkit 2/3] Refactor plugin_* functions into a backend struct.
Introduce the concept of a backend. Currently the only type of
backend is a plugin, and there can only be one of them. Instead of
calling functions like ‘plugin_pwrite’ you call the backend method
‘backend->pwrite (backend, ...)’.
The change is largely mechanical. I was able to remove ‘assert (dl)’
statements throughout since we can now prove they will never be
called.
Note this does not
2018 Jan 17
0
[PATCH 2/9] Refactor plugin_* functions into a backend struct.
Introduce the concept of a backend. Currently the only type of
backend is a plugin, and there can only be one of them. Instead of
calling functions like ‘plugin_pwrite’ you call the backend method
‘backend->pwrite (backend, ...)’.
The change is largely mechanical. I was able to remove ‘assert (dl)’
statements throughout since we can now prove they will never be
called.
Note this does not
2018 Jan 16
0
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend struct.
Introduce the concept of a backend. Currently the only type of
backend is a plugin, and there can only be one of them. Instead of
calling functions like ‘plugin_pwrite’ you call the backend method
‘backend->pwrite (backend, ...)’.
The change is largely mechanical. I was able to remove ‘assert (dl)’
statements throughout since we can now prove they will never be
called.
Note this does not
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
This follows (tails) a log file within a guest, rather like
the regular 'tail -f' command. For example:
virt-tail -d guest /var/log/messages
---
.gitignore | 3 +
bash/Makefile.am | 4 +-
bash/virt-alignment-scan | 6 +
cat/Makefile.am | 47 ++++-
cat/tail.c | 502 +++++++++++++++++++++++++++++++++++++++++++++++
cat/test-docs.sh
2020 Aug 20
0
[PATCH nbdkit 12/13] wrapper: Port the wrapper to run on Windows.
This also defines SOEXT as the extension of shared objects (ie. "so"
or "dll"), and uses it everywhere. I assumed this must already be
defined by either autoconf or mingw (like OBJEXT) but I cannot find
anything except in glib (G_MODULE_SUFFIX).
Thanks: Zebediah Figura for helping out with exec vs spawn on Windows.
---
configure.ac | 8 +++-
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
This follows (tails) a log file within a guest, rather like
the regular 'tail -f' command. For example:
virt-tail -d guest /var/log/messages
---
.gitignore | 3 +
bash/Makefile.am | 4 +-
bash/virt-alignment-scan | 6 +
cat/Makefile.am | 47 ++++-
cat/tail.c | 498 +++++++++++++++++++++++++++++++++++++++++++++++
cat/test-docs.sh
2019 Oct 14
0
Re: [PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
On 10/12/19 9:21 AM, Richard W.M. Jones wrote:
> This program allows you to turn a network block device source into a
> FUSE filesystem containing a virtual file:
>
> $ nbdkit memory 128M
> $ mkdir mp
> $ nbdfuse mp/ramdisk nbd://localhost &
> $ ls -l mp
> total 0
> -rw-rw-rw-. 1 rjones rjones 134217728 Oct 12 15:09 ramdisk
> $ dd
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
On Monday, 3 October 2016 13:27:13 CEST Richard W.M. Jones wrote:
> This follows (tails) a log file within a guest, rather like
> the regular 'tail -f' command. For example:
>
> virt-tail -d guest /var/log/messages
> ---
> .gitignore | 3 +
> bash/Makefile.am | 4 +-
> bash/virt-alignment-scan | 6 +
> cat/Makefile.am |