Displaying 3 results from an estimated 3 matches for "cleanup_free_statvfs".
Did you mean:
cleanup_free_statns
2020 Feb 26
1
[PATCH] filesystems: fix size reporting for filesystems
...estfs_blockdev_getsize64 (g, fses[i]);
+ /* Try mounting and stating the device. This might reasonably
+ * fail, so don't show errors.
+ */
+ guestfs_push_error_handler (g, NULL, NULL);
+
+ if (guestfs_mount_ro (g, fses[i], "/") == 0) {
+ CLEANUP_FREE_STATVFS struct guestfs_statvfs *stat = NULL;
+
+ stat = guestfs_statvfs (g, "/");
+ size = stat->blocks * stat->bsize;
+ guestfs_umount_all (g);
+ } else {
+ size = guestfs_blockdev_getsize64 (g, fses[i]);
+ }
+
+ guestfs_pop_error_ha...
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...*/
+ if (STREQ (type, "vfat"))
+ options = "utf8";
+ else
+ options = "";
+
+ if (guestfs_mount_options (g, options, dev, "/") == -1)
+ return -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->f...
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.