mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained in:
@@ -282,8 +282,8 @@ do_ntfscat_i (const mountable_t *mountable, int64_t inode)
|
||||
}
|
||||
|
||||
/* Construct the command. */
|
||||
if (asprintf_nowarn (&cmd, "ntfscat -i %ld %s",
|
||||
inode, mountable->device) == -1) {
|
||||
if (asprintf (&cmd, "ntfscat -i %" PRIi64 " %s",
|
||||
inode, mountable->device) == -1) {
|
||||
reply_with_perror ("asprintf");
|
||||
return -1;
|
||||
}
|
||||
@@ -311,14 +311,14 @@ do_ntfscat_i (const mountable_t *mountable, int64_t inode)
|
||||
}
|
||||
|
||||
if (ferror (fp)) {
|
||||
fprintf (stderr, "fread: %ld: %m\n", inode);
|
||||
fprintf (stderr, "fread: %" PRIi64 ": %m\n", inode);
|
||||
send_file_end (1); /* Cancel. */
|
||||
pclose (fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pclose (fp) != 0) {
|
||||
fprintf (stderr, "pclose: %ld: %m\n", inode);
|
||||
fprintf (stderr, "pclose: %" PRIi64 ": %m\n", inode);
|
||||
send_file_end (1); /* Cancel. */
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user