search for: xstrtol

Displaying 20 results from an estimated 223 matches for "xstrtol".

2010 Feb 22
2
Debian libguestfs packages updated
...ine we can't run the fuse tests easily in a chroot (since we might be unable to load the module) I'm using the attached patch to skip the tests if /dev/fuse doesn't exist. This probably isn't clean enough to go upstream though. The other patch adjusts the test output of rhbz557655. xstrtol seems to be behaving differently here. I didn't investigate why yet. As a last point: is there a simple way to disable the appliance build altogether? I'd like to ship the Debian package without it so we stay out of the security update trouble and provide them via http. Cheers and thanks...
2010 Jan 25
2
[PATCH version 2] guestfish: Use xstrtol to parse integers (RHBZ#557655).
.../fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw -------------- next part -------------- >From 712adf306e22487cf8ec4bf508917dbb8ed5f357 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Fri, 22 Jan 2010 11:01:06 +0000 Subject: [PATCH] guestfish: Use xstrtol to parse integers (RHBZ#557655). Current code uses atoi to parse the generator Int type and atoll to parse the generator Int64 type. The problem with the ato* functions is that they don't cope with errors very well, and they cannot parse numbers that begin with 0.. or 0x.. for octal and hexad...
2016 Jul 18
2
[PATCH] mllib: Getopt: fix integer parsing
Since we are using gnulib already, make use of xstrtol to parse the integer arguments to avoid extra suffixes, etc. Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee. --- mllib/getopt-c.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index 1f129a7..2d3f...
2010 Jan 22
0
[PATCH] guestfish: Use xstrtol to parse integers (RHBZ#557655).
...n machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v -------------- next part -------------- >From 1ddc2d465a6b133c15589f7e294c14feaf09b263 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Fri, 22 Jan 2010 11:01:06 +0000 Subject: [PATCH] guestfish: Use xstrtol to parse integers (RHBZ#557655). Current code uses atoi to parse the generator Int type and atoll to parse the generator Int64 type. The problem with the ato* functions is that they don't cope with errors very well, and they cannot parse numbers that begin with 0.. or 0x.. for octal and hexad...
2014 Dec 05
2
Re: [PATCH 1/8] New API: btrfs_subvolume_get_default
...ADD_ARG (argv, i, "get-default"); > + ADD_ARG (argv, i, fs_buf); > + ADD_ARG (argv, i, NULL); > + > + r = commandv (&out, &err, argv); > + if (r == -1) { > + reply_with_error ("%s: %s", mountpoint, err); > + return -1; > + } > + r = xstrtol (out + 2, NULL, 10, &ret, NULL); Unfortunately even gnulib's "xstrtol" function is a minefield, and the code above won't work [specifically -- it's insecure] on 32 bit machines. Anyway, I think it's better to use sscanf here, so: if (sscanf (out, "ID %"...
2011 Jun 03
0
builder-debian febootstrap success e56ae34bcfc3e355dc591b4bd99bbe8e593d33af
...tdarg stdbool stddef stdint stdio stdlib strdup-posix strerror string sys_stat sys_wait time unistd unistd-safer unlink vasnprintf vasprintf verify warn-on-use wchar write xalloc xalloc-die xgetcwd xsize xstrtol xvasprintf Notice from module error: If you are using GNU gettext version 0.16.1 or older, add the following options to XGETTEXT_OPTIONS in your po/Makevars: --flag=error:3:c-format --flag=error_at_line:5:c-format Notice from module vasprintf: If you are using GNU gettext version 0.16.1...
2010 Dec 07
0
builder-ubuntu febootstrap success af9f9305a0a48829392a57d24aee30978b449d1d
...tdarg stdbool stddef stdint stdio stdlib strdup-posix strerror string sys_stat sys_wait time unistd unistd-safer unlink vasnprintf vasprintf verify warn-on-use wchar write xalloc xalloc-die xgetcwd xsize xstrtol xvasprintf Notice from module error: If you are using GNU gettext version 0.16.1 or older, add the following options to XGETTEXT_OPTIONS in your po/Makevars: --flag=error:3:c-format --flag=error_at_line:5:c-format Notice from module vasprintf: If you are using GNU gettext version 0.16.1...
2016 Jul 18
0
Re: [PATCH] mllib: Getopt: fix integer parsing
On Mon, Jul 18, 2016 at 10:13:30AM +0200, Pino Toscano wrote: > Since we are using gnulib already, make use of xstrtol to parse the > integer arguments to avoid extra suffixes, etc. > > Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee. > --- > mllib/getopt-c.c | 34 ++++++++++++++++++++++++---------- > 1 file changed, 24 insertions(+), 10 deletions(-) > > diff --git a/mllib/getopt-c....
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Difference to v3: Decapitalize error messages. Maxim Perevedentsev (2): New API: vfs_minimum_size Include resize2fs_P into vfs_minimum_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 62 ++++++++++++++++++++++++++++++++---...
2015 Oct 20
4
[PATCHv3 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 62 ++++++++++++++++++++++++++++++++----- daemon/fs-min-size.c | 49 ++++++++++++++++++++++++++...
2011 May 27
1
builder-debian febootstrap success b5ed2a56e1d9c826e494fea5c6a353d45f3c857f
...tdarg stdbool stddef stdint stdio stdlib strdup-posix strerror string sys_stat sys_wait time unistd unistd-safer unlink vasnprintf vasprintf verify warn-on-use wchar write xalloc xalloc-die xgetcwd xsize xstrtol xvasprintf Notice from module error: If you are using GNU gettext version 0.16.1 or older, add the following options to XGETTEXT_OPTIONS in your po/Makevars: --flag=error:3:c-format --flag=error_at_line:5:c-format Notice from module vasprintf: If you are using GNU gettext version 0.16.1...
2016 Jul 18
2
Re: [PATCH] mllib: Getopt: fix integer parsing
On Monday, 18 July 2016 09:38:43 CEST Richard W.M. Jones wrote: > On Mon, Jul 18, 2016 at 10:13:30AM +0200, Pino Toscano wrote: > > Since we are using gnulib already, make use of xstrtol to parse the > > integer arguments to avoid extra suffixes, etc. > > > > Fixes commit 0f7bf8f714898c606e5d5015fff5b7803dcd1aee. > > --- > > mllib/getopt-c.c | 34 ++++++++++++++++++++++++---------- > > 1 file changed, 24 insertions(+), 10 deletions(-) > >...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...har *get_blkid_tag (const char *device, const char *tag); diff --git a/daemon/ext2.c b/daemon/ext2.c index 0cd6a66..01f934b 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -29,6 +29,7 @@ #include "daemon.h" #include "c-ctype.h" #include "actions.h" +#include "xstrtol.h" #define MAX_ARGS 128 @@ -279,15 +280,41 @@ do_resize2fs_M (const char *device) return 0; } +static long +get_block_size (const char *device) +{ + CLEANUP_FREE_STRING_LIST char **params = NULL; + const char *block_pattern = "Block size"; + size_t i; + long block_size; +...
2014 Nov 21
2
Re: [PATCH 5/6] New API: btrfs_subvolume_get_default
...if (debug) ...). > + if (r == -1) { > + reply_with_error ("%s: %s", fs, err); > + return -1; > + } > + r = -1; Most probably it is not needed to manually reset r. > + if (sscanf (out, "ID %" SCNi32, &r) != 1) { It would be simplier to just use xstrtol to parse the output. > + reply_with_error ("%s: expected output, but got nothing", argv[0]); More than "nothing", "not a number". I'd also append the whole output here. > diff --git a/generator/actions.ml b/generator/actions.ml > index 1c1fcff..cf96...
2010 Nov 26
2
Hivex licensing question
...(according to .gnulib/modules/* License field which is what you should look at, *not* the comments at the top of each gnulib source file bizarrely). Therefore I think for the library we are OK. Just to complete the analysis, for the programs we are using: hivexsh c-ctype LGPLv2+ hivexsh xstrtol GPL The Makefiles are GPL, but they don't affect the library or the programs in any way. They constitute a separate program used to build the software. Rich. CC'd to Jim: This analysis is a pain, and gnulib-tool doesn't let you say "I want to use LGPL for this directory and G...
2019 Sep 23
0
[PATCH v2 5/5] build: remove unused gnulib modules
...netdb -netinet_in nonblocking -openat perror pipe2 pread -ptsname_r -read-file readlink select setenv sleep socket -stat-time strchrnul strerror strndup -symlinkat sys_select sys_types sys_wait @@ -166,9 +152,6 @@ tls vasprintf vc-list-files warnings -xalloc -xalloc-die -xgetcwd xstrtol xstrtoll xvasprintf diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 49dbf1998..7c71920c4 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -225,13 +225,9 @@ guestfsd_LDADD = \ $(HIVEX_LIBS) \ $(SD_JOURNAL_LIBS) \ $(top_builddir)/gnulib/lib/.libs/libgnu.a \ - $(GETADDRIN...
2011 Jun 07
3
builder-debian febootstrap success d6d144eab55388d4117880f2d3a7e8c2571c9d9a
...tdarg stdbool stddef stdint stdio stdlib strdup-posix strerror string sys_stat sys_wait time unistd unistd-safer unlink vasnprintf vasprintf verify warn-on-use wchar write xalloc xalloc-die xgetcwd xsize xstrtol xvasprintf Notice from module error: If you are using GNU gettext version 0.16.1 or older, add the following options to XGETTEXT_OPTIONS in your po/Makevars: --flag=error:3:c-format --flag=error_at_line:5:c-format Notice from module vasprintf: If you are using GNU gettext version 0.16.1...
2015 Oct 20
1
[PATCHv3 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments. Difference to v1: Added reply_with_error where necessary. Changed name get_min_size -> vfs_min_size. Difference to v2: Changed name to vfs_minimum_size. Changed parsing to xstrtol + STR* macros where possible. Maxim Perevedentsev (2): New API: vfs_min_size Include resize2fs_P into vfs_min_size. daemon/Makefile.am | 1 + daemon/daemon.h | 2 ++ daemon/ext2.c | 62 ++++++++++++++++++++++++++++++++----- daemon/fs-min-size.c | 49 ++++++++++++++++++++++++++...
2016 Jul 18
0
[PATCH v3 1/3] mllib: getopt: Further fix int parsing.
...6511bbd4349317. --- mllib/getopt-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index bf40f91..13852c2 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -124,13 +124,13 @@ strtoint (const char *arg) { long int num; - if (xstrtol (arg, NULL, 0, &num, NULL) != LONGINT_OK) { + if (xstrtol (arg, NULL, 0, &num, "") != LONGINT_OK) { fprintf (stderr, _("%s: '%s' is not a numeric value.\n"), guestfs_int_program_name, arg); show_error (EXIT_FAILURE); } - if (num &lt...
2013 Aug 25
1
modules in gnulib that are GPL
gettime hash human memcpy openat-die openat-safer quote quotearg readlinkat save-cwd symlinkat timespec utimens xstrtol xstrtoll xstrtoumax xvasprintf I didnt track where they are uses, some of them arent used directly.