Displaying 8 results from an estimated 8 matches for "parse_uint32".
2012 Jul 16
2
[PATCH V4] NEW API: add new api xfs_info
...#39;,') end++;
+ size_t len = end - string;
+ char *ret = malloc (len + 1);
+ if (!ret) {
+ reply_with_perror ("malloc");
+ return NULL;
+ }
+ strncpy (ret, string, len);
+ ret[len] = '\0';
+ fprintf(stderr, "%s\n", ret);
+ return ret;
+}
+
+static int
+parse_uint32 (uint32_t *ret, const char *str)
+{
+ uint32_t r;
+
+ if (sscanf (str, "%" SCNu32, &r) != 1) {
+ reply_with_error ("cannot parse numeric field from isoinfo: %s", str);
+ return -1;
+ }
+
+ *ret = r;
+ return 0;
+}
+
+static int
+parse_uint64 (uint64_t *ret, const...
2012 Apr 17
1
[PATCH 2/2] replace local_strtoull with _strtoui64 in windows
...ptions.c
@@ -25,6 +25,7 @@
#include "utils.h"
#include "FLAC/assert.h"
#include "share/alloc.h"
+#include "share/compat.h"
#include "share/grabbag/replaygain.h"
#include <ctype.h>
#include <stdio.h>
@@ -840,34 +841,12 @@ FLAC__bool parse_uint32(const char *src, FLAC__uint32 *dest)
return true;
}
-#ifdef _MSC_VER
-/* There's no strtoull() in MSVC6 so we just write a specialized one */
-static FLAC__uint64 local__strtoull(const char *src)
-{
- FLAC__uint64 ret = 0;
- int c;
- FLAC__ASSERT(0 != src);
- while(0 != (c = *src++)) {
-...
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...quot;w");
if (fp == NULL) {
diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c
index c0ee1c9..d117b40 100644
--- a/daemon/isoinfo.c
+++ b/daemon/isoinfo.c
@@ -30,6 +30,8 @@
#include "daemon.h"
#include "actions.h"
+GUESTFSD_EXT_CMD(str_isoinfo, isoinfo);
+
static int
parse_uint32 (uint32_t *ret, const char *str)
{
@@ -244,7 +246,7 @@ isoinfo (const char *path)
/* --debug is necessary to get additional fields, in particular
* the date & time fields.
*/
- r = command (&out, &err, "isoinfo", "--debug", "-d", "-i"...
2012 Aug 30
1
[PATCH] collect list of called external commands
..."w");
if (fp == NULL) {
diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c
index c0ee1c9..ce92240 100644
--- a/daemon/isoinfo.c
+++ b/daemon/isoinfo.c
@@ -30,6 +30,8 @@
#include "daemon.h"
#include "actions.h"
+GUESTFS_EXT_CMD(str_isoinfo, isoinfo);
+
static int
parse_uint32 (uint32_t *ret, const char *str)
{
@@ -244,7 +246,7 @@ isoinfo (const char *path)
/* --debug is necessary to get additional fields, in particular
* the date & time fields.
*/
- r = command (&out, &err, "isoinfo", "--debug", "-d", "-i"...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...;w");
if (fp == NULL) {
diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c
index 3e1acf848..e616df82f 100644
--- a/daemon/isoinfo.c
+++ b/daemon/isoinfo.c
@@ -30,8 +30,6 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_isoinfo, isoinfo);
-
static int
parse_uint32 (uint32_t *ret, const char *str)
{
@@ -246,7 +244,7 @@ isoinfo (const char *path)
/* --debug is necessary to get additional fields, in particular
* the date & time fields.
*/
- r = command (&out, &err, str_isoinfo, "--debug", "-d", "-i", path,...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...on/isoinfo.c b/daemon/isoinfo.c
index 3e1acf848..c59a698aa 100644
--- a/daemon/isoinfo.c
+++ b/daemon/isoinfo.c
@@ -30,7 +30,7 @@
#include "daemon.h"
#include "actions.h"
-GUESTFSD_EXT_CMD(str_isoinfo, isoinfo);
+DECLARE_EXTERNAL_COMMANDS ("isoinfo")
static int
parse_uint32 (uint32_t *ret, const char *str)
@@ -246,7 +246,7 @@ isoinfo (const char *path)
/* --debug is necessary to get additional fields, in particular
* the date & time fields.
*/
- r = command (&out, &err, str_isoinfo, "--debug", "-d", "-i", path, NUL...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’