Displaying 20 results from an estimated 208 matches for "prii64".
2016 Aug 08
1
[PATCH] sleuthkit code cleanup
...--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)
}
/* Construct the command. */
- ret = asprintf(&cmd, "%s -r %s %" PRIi64, str_icat, mountable->device, inode);
+ ret = asprintf (&cmd, "%s -r %s %" PRIi64,
+ str_icat, mountable->device, inode);
if (ret < 0) {
reply_with_perror ("asprintf");
return -1;
@@ -85,7 +86,7 @@ do_download_blocks (const mountable_t...
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...git a/daemon/xfs.c b/daemon/xfs.c
index e5e8b62..c1a1854 100644
--- a/daemon/xfs.c
+++ b/daemon/xfs.c
@@ -408,7 +408,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("logsize must be >= 0");
return -1;
}
- snprintf(logsize_s, sizeof logsize_s, "%" PRIi64, logsize);
+ snprintf (logsize_s, sizeof logsize_s, "%" PRIi64, logsize);
ADD_ARG (argv, i, "-L");
ADD_ARG (argv, i, logsize_s);
}
@@ -418,7 +418,7 @@ do_xfs_growfs (const char *path,
reply_with_error ("rtsize must be >= 0");
return -1;...
2014 Oct 14
1
[PATCH] diff: do not pad uid/gid in CSV mode
...2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diff/diff.c b/diff/diff.c
index f4b25e9..ad371b0 100644
--- a/diff/diff.c
+++ b/diff/diff.c
@@ -1108,7 +1108,7 @@ output_int64_uid (int64_t i)
{
next_field ();
/* csv doesn't need escaping */
- if (printf ("%4" PRIi64, i) < 0) {
+ if (printf (csv ? "%" PRIi64 : "%4" PRIi64, i) < 0) {
perror ("printf");
exit (EXIT_FAILURE);
}
--
1.9.3
2012 Aug 31
1
[PATCH V1] NEW API:ext:mke2fs
...+ ADD_ARG (argv, i, badblockfile);
+ }
+ }
+ if (optargs_bitmask & GUESTFS_MKE2FS_BLOCKSIZE_BITMASK) {
+ if (blocksize < 0) {
+ reply_with_error ("blocksize must be >= 0");
+ goto error;
+ }
+ snprintf (blocksize_s, sizeof blocksize_s, "%" PRIi64, blocksize);
+ ADD_ARG (argv, i, "-b");
+ ADD_ARG (argv, i, blocksize_s);
+ }
+ if (optargs_bitmask & GUESTFS_MKE2FS_DIRECTWRITE_BITMASK) {
+ if (directwrite)
+ ADD_ARG (argv, i, "-D");
+ }
+ if (optargs_bitmask & GUESTFS_MKE2FS_FRAGSIZE_BITMASK) {
+...
2012 Jul 31
1
[PATCH] xfs: add new api xfs-growfs
...if (rtsec)
+ ADD_ARG (argv, i, "-r");
+
+ if (optargs_bitmask & GUESTFS_XFS_GROWFS_DATASIZE_BITMASK) {
+ if (datasize < 0) {
+ reply_with_error ("datasize must be >= 0");
+ goto error;
+ }
+ snprintf (datasize_s, sizeof datasize_s, "%" PRIi64, datasize);
+ ADD_ARG (argv, i, "-D");
+ ADD_ARG (argv, i, datasize_s);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_GROWFS_LOGSIZE_BITMASK) {
+ if (logsize < 0) {
+ reply_with_error ("logsize must be >= 0");
+ goto error;
+ }
+ snprintf(logsize...
2012 Aug 21
1
[PATCH] xfs: add a new api xfs_repair
...ot;);
+ ADD_ARG (argv, i, "force_geometry");
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_MAXMEM_BITMASK) {
+ if (maxmem < 0) {
+ reply_with_error ("maxmem must be >= 0");
+ goto error;
+ }
+ snprintf(maxmem_s, sizeof maxmem_s, "%" PRIi64, maxmem);
+ ADD_ARG (argv, i, "-m");
+ ADD_ARG (argv, i, maxmem_s);
+ }
+
+ if (optargs_bitmask & GUESTFS_XFS_REPAIR_IHASHSIZE_BITMASK) {
+ if (ihashsize < 0) {
+ reply_with_error ("ihashsize must be >= 0");
+ goto error;
+ }
+ snprintf(ihash...
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 92...
2020 Jan 07
3
[PATCH] Fix lossy conversion of Content-Length
...url/curl.c b/plugins/curl/curl.c
index 031bd32..fe1330e 100644
--- a/plugins/curl/curl.c
+++ b/plugins/curl/curl.c
@@ -389,7 +389,7 @@ curl_open (int readonly)
goto err;
}
- h->exportsize = (size_t) d;
+ h->exportsize = (int64_t) d;
nbdkit_debug ("content length: %" PRIi64, h->exportsize);
if (strncasecmp (url, "http://", strlen ("http://")) == 0 ||
--
2.17.1
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...-1;
+
+ /* For debugging, print statvfs before and after doing the tar-in. */
+ if (verbose) {
+ CLEANUP_FREE_STATVFS struct guestfs_statvfs *stats =
+ guestfs_statvfs (g, "/");
+ fprintf (stderr, "before uploading:\n");
+ fprintf (stderr, " bsize = %" PRIi64 "\n", stats->bsize);
+ fprintf (stderr, " frsize = %" PRIi64 "\n", stats->frsize);
+ fprintf (stderr, " blocks = %" PRIi64 "\n", stats->blocks);
+ fprintf (stderr, " bfree = %" PRIi64 "\n", stats->bfree);...
2017 Dec 12
2
[PATCH] df: Handle block sizes smaller than 1024 bytes (RHBZ#1525241).
...;
@@ -109,15 +125,13 @@ print_stat (FILE *fp,
if (!inodes) { /* 1K blocks */
if (!human) {
- factor = stat->bsize / 1024;
-
- v = stat->blocks * factor;
+ v = scale (stat->blocks, stat->bsize, 1024);
snprintf (buf[0], MAX_LEN, "%" PRIi64, v);
cols[0] = buf[0];
- v = (stat->blocks - stat->bfree) * factor;
+ v = scale (stat->blocks - stat->bfree, stat->bsize, 1024);
snprintf (buf[1], MAX_LEN, "%" PRIi64, v);
cols[1] = buf[1];
- v = stat->bavail * factor;
+ v = scale...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C.
Two days later ...
The Perl program uses a lot of external commands, which makes
it pretty tedious to implement in C.
Rich.
2012 May 10
1
guestfs_mount_local* api undefined symbols
Recently i deployed latest 1.17.40 on rhel6.1.
When i ran a tiny program which was to test the function guestfs_mount_local() or those similar functions that mounts locally, Error prompted?undefined symbol guest_mount_local !
Why didn`t this undefined symbol error prompt when the program was first compiled,but occurred when it was run?
Then i gave guestfish mount local a try in the shell, and
2016 Jun 29
2
[PATCH 0/2] Added download_blocks API
With this API we complete the set of functions required to extract
deleted files/data from most of the available filesystems.
The function allows to extract data units (blocks) within a given range
from a partition.
The tests show an example on how the function can be used to retrieve
deleted data.
Matteo Cafasso (2):
New API: download_blocks
Added download_blocks API test
2016 Jul 17
4
[PATCH v2 0/2] Added download_blocks API
v2:
- Rebase on top of master
Matteo Cafasso (2):
New API: download_blocks
Added download_blocks API test
daemon/sleuthkit.c | 41 ++++++++++++++++++++++++++-
generator/actions.ml | 24 ++++++++++++++++
gobject/Makefile.inc | 2 ++
src/MAX_PROC_NR | 2 +-
tests/tsk/Makefile.am | 1 +
2012 May 10
1
回复: guestfs_mount_local* api undefined symbols
...s that it's using:
http://libguestfs.org/guestfs.3.html#guestfs_version
#include <stdio.h>
#include <inttypes.h>
#include <guestfs.h>
//...
guestfs_h *g = guestfs_create ();
struct guestfs_version *vers = guestfs_version (g);
printf ("version = %" PRIi64 ".%" PRIi64 ".%" PRIi64 ".%s",
vers->major, vers->minor, vers->release, vers->extra);
Rich.
[1] http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read...
2020 Oct 06
2
[PATCH libnbd] info: Write output atomically.
...stderr, "%s: ", progname);
+ perror ("open_memstream");
+ exit (EXIT_FAILURE);
+ }
+
/* Open the NBD side. */
nbd = nbd_create ();
if (nbd == NULL) {
@@ -250,7 +264,7 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- printf ("%" PRIi64 "\n", size);
+ fprintf (fp, "%" PRIi64 "\n", size);
}
else if (map) { /* --map (!list_all) */
uint64_t offset, prev_offset;
@@ -269,7 +283,7 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
- if (json_output) printf (...
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...static void
-output_int64_time (int64_t i)
+output_int64_time (int64_t secs, int64_t nsecs)
{
int r;
@@ -713,19 +713,19 @@ output_int64_time (int64_t i)
if (time_t_output) {
switch (time_relative) {
case 0: /* --time-t */
- r = printf ("%10" PRIi64, i);
+ r = printf ("%10" PRIi64, secs);
break;
case 1: /* --time-relative */
- r = printf ("%8" PRIi64, now - i);
+ r = printf ("%8" PRIi64, now - secs);
break;
case 2: /* --time-days */...
2020 Apr 08
2
[PATCH nbdkit v3] tmpdisk: Generalize the tmpdisk plugin.
v2 was here:
https://www.redhat.com/archives/libguestfs/2020-April/msg00075.html
In v3:
- Add [VAR=VALUE ...] to manual.
- Various minor improvements to the manual.
- Work (at least, in theory - not tested) with block devices or
symlinks. I didn't document this because it's hard to ensure these
files or block devices would be cleaned up, so here be dragons.
- Remove O_NOCTTY.
-
2010 Aug 04
1
[PATCH] Send trace output to stderr
...\" : \" false\", stderr);\n" n
| Int n -> (* int *)
- pr " printf (\" %%d\", %s);\n" n
+ pr " fprintf (stderr, \" %%d\", %s);\n" n
| Int64 n ->
- pr " printf (\" %%\" PRIi64, %s);\n" n
+ pr " fprintf (stderr, \" %%\" PRIi64, %s);\n" n
) (snd style);
- pr " putchar ('\\n');\n";
+ pr " fputc ('\\n', stderr);\n";
pr " }\n";
pr "\n";
in
--
1.7.2
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
.../* INT_MIN */
+ PARSE (unsigned, "%u", "0x7fffffff", OK, 0x7fffffff);
+ PARSE (unsigned, "%u", "-0x80000000", BAD, 0);
+
+ /* Test nbdkit_parse_long. */
+ PARSE (long, "%ld", "0", OK, 0);
+ assert (snprintf (s, sizeof s, "%" PRIi64, (int64_t) LONG_MAX) != -1);
+ PARSE (long, "%ld", s, OK, LONG_MAX);
+ assert (snprintf (s, sizeof s, "%" PRIi64, (int64_t) LONG_MIN) != -1);
+ PARSE (long, "%ld", s, OK, LONG_MIN);
+ PARSE (long, "%ld", "999999999999999999999999", BAD, 0);
+ P...