Displaying 14 results from an estimated 14 matches for "guestfs_blockdev_getsize64".
2016 Jun 08
1
[PATCH] filesystems: don't try to get the size of btrfs subvolume
...1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/cat/filesystems.c b/cat/filesystems.c
index f1c2852..f679517 100644
--- a/cat/filesystems.c
+++ b/cat/filesystems.c
@@ -476,9 +476,27 @@ do_output_filesystems (void)
}
}
if ((columns & COLUMN_SIZE)) {
- size = guestfs_blockdev_getsize64 (g, fses[i]);
- if (size == -1)
+ CLEANUP_FREE char *device = guestfs_mountable_device (g, fses[i]);
+ CLEANUP_FREE char *subvolume = NULL;
+
+ guestfs_push_error_handler (g, NULL, NULL);
+
+ subvolume = guestfs_mountable_subvolume (g, fses[i]);
+ if (subvolume == NULL...
2016 Jun 15
1
[PATCH v2] filesystems: don't try to get the size of btrfs subvolume
...1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/cat/filesystems.c b/cat/filesystems.c
index f1c2852..cfdac86 100644
--- a/cat/filesystems.c
+++ b/cat/filesystems.c
@@ -476,9 +476,28 @@ do_output_filesystems (void)
}
}
if ((columns & COLUMN_SIZE)) {
- size = guestfs_blockdev_getsize64 (g, fses[i]);
- if (size == -1)
+ CLEANUP_FREE char *device = guestfs_mountable_device (g, fses[i]);
+ CLEANUP_FREE char *subvolume = NULL;
+
+ guestfs_push_error_handler (g, NULL, NULL);
+
+ subvolume = guestfs_mountable_subvolume (g, fses[i]);
+ if (subvolume == NULL...
2020 Feb 26
1
[PATCH] filesystems: fix size reporting for filesystems
...tions(+), 1 deletion(-)
diff --git a/cat/filesystems.c b/cat/filesystems.c
index cec3c4e47..2b95d3112 100644
--- a/cat/filesystems.c
+++ b/cat/filesystems.c
@@ -508,7 +508,23 @@ do_output_filesystems (void)
guestfs_pop_error_handler (g);
if (!device || !subvolume) {
- size = guestfs_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 str...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2012 Jan 31
2
[PATCH 1/2] examples: code cleanups
do a code cleanup by removing the tailing spaces
Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
examples/create_disk.c | 2 +-
examples/inspect_vm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/create_disk.c b/examples/create_disk.c
index f4b9044..bcad6d8 100644
--- a/examples/create_disk.c
+++ b/examples/create_disk.c
@@ -7,7 +7,7
2010 Sep 12
1
virt-resize: ntfsresize: location outside device
I have a 15G qcow2 xp vm with only 1 partition:
-rw-------. 1 root root 10514137088 Sep 12 11:10 XP.img
I want to resize it to 20G. So I :
virsh vol-create-as --format raw windows XP-new-20G.img 20G
Vol XP-new-20G.img created
-rw-------. 1 root root 21474836480 Sep 12 13:17 XP-new-20G.img
But:
virt-resize --expand /dev/sda1 XP.img XP-new-20G.img
Summary of changes:
/dev/sda1: partition will
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...ot;, 5) == 0 &&
- strncmp (&lvs[j][5], vgs[i], len) == 0 &&
+ if (STREQLEN (lvs[j], "/dev/", 5) &&
+ STREQLEN (&lvs[j][5], vgs[i], len) &&
lvs[j][len+5] == '/') {
int64_t size;
CALL (size = guestfs_blockdev_getsize64 (g, lvs[j]), -1);
@@ -125,7 +125,7 @@ display_partition (guestfs_h *g, const char *dev)
printf ("<windows/>\n");
else if (strstr (what, "boot sector") != NULL)
display_partitions (g, dev);
- else if (strncmp (what, "LVM2", 4) == 0)
+ else if (STREQ...
2012 Jan 17
2
[PATCH v2] New tool: virt-format
This is the same as the previous patch, but the partition type is now
chosen automatically from mbr or gpt, unless the user expresses a
preference.
https://gb.redhat.com/archives/libguestfs/2012-January/msg00136.html
Rich.
2018 Jul 31
7
[PATCH nbdkit 0/4] Add truncate and map filters.
This patch series proposes two new filters.
* truncate: This can truncate, extend, round up or round down the size
of a plugin/device. A typical usage is to fix the qemu problem that
it can only handle devices which are a multiple of 512-bytes:
nbdkit --filter=truncate random size=500 round-up=512
This will serve a virtual device with size 512 bytes. Reading from
the last 12 bytes will
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in:
https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html
Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...-xml.c
@@ -89,14 +89,14 @@ main (int argc, char *argv[])
int j;
for (j = 0; lvs[j] != NULL; ++j) {
if (strncmp (lvs[j], "/dev/", 5) == 0 &&
- strncmp (&lvs[j][5], vgs[i], len) == 0 &&
- lvs[j][len+5] == '/') {
- int64_t size;
- CALL (size = guestfs_blockdev_getsize64 (g, lvs[j]), -1);
- printf ("<logvol name=\"%s\" size=\"%" PRIi64 "\">\n", lvs[j], size);
- display_partition (g, lvs[j]);
- printf ("</logvol>\n");
- free (lvs[j]);
+ strncmp (&lvs[j][5], vgs[i], len) == 0 &&
+...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...ile"], [];
+ style = RInt64 "size", [String (Pathname, "file")], [];
tests = [
InitScratchFS, Always, TestResult (
[["write"; "/filesize"; "hello, world"];
@@ -5337,7 +5337,7 @@ To get the size of block devices, use C<guestfs_blockdev_getsize64>." };
{ defaults with
name = "lvrename"; added = (1, 0, 83);
- style = RErr, [String "logvol"; String "newlogvol"], [];
+ style = RErr, [String (PlainString, "logvol"); String (PlainString, "newlogvol")], [];
tests = [...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator.
Rich.
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files.
Rich.