search for: guestfs_max_disk

Displaying 16 results from an estimated 16 matches for "guestfs_max_disk".

Did you mean: guestfs_max_disks
2017 May 02
2
[PATCH v2] launch: Error if you try to launch with too many drives.
v1 was here: https://www.redhat.com/archives/libguestfs/2017-April/msg00268.html v1 broke some tests because the guestfs_max_disks API isn't supported by some backends, specifically ?unix:?. This makes failure of guestfs_max_disks non-fatal. Rich.
2012 Jul 09
1
[PATCH] NEW API: add new api xfs_info
...ions.ml b/generator/generator_actions.ml index 5baa9b2..ba0b0de 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -7374,6 +7374,12 @@ be returned if you called C<guestfs_list_devices>. To find out the maximum number of devices that could be added, call C<guestfs_max_disks>."); + ("xfs_info", (RString "information", [String "path"], []), 337, [Optional "xfs"], + [], + "print out the geometry of the filesystem", + "\ +Thie function can print out the geometry of an mounted XFS filesystem.");...
2012 Jul 24
3
[PATCH V4 1/3] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/mount.c | 25 +++++++++++++++++++++++-- generator/generator_actions.ml | 23 ++++++++++++----------- gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git
2012 Jul 23
3
[PATCH V2 1/4] mount: add a macro to resolve path or device
Add a macro STRDUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/daemon.h | 16 ++++++++++++++++ daemon/mount.c | 13 ++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 85eec45..f7d0c75 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -336,6
2017 Apr 28
0
[PATCH] launch: Error if you try to launch with too many drives.
...b/launch.c @@ -55,12 +55,23 @@ static struct backend { int guestfs_impl_launch (guestfs_h *g) { + int r; + /* Configured? */ if (g->state != CONFIG) { error (g, _("the libguestfs handle has already been launched")); return -1; } + /* Too many drives? */ + r = guestfs_max_disks (g); + if (r == -1) + return -1; + if (g->nr_drives > (size_t) r) { + error (g, _("too many drives have been added, the current backend only supports %d drives"), r); + return -1; + } + /* Start the clock ... */ gettimeofday (&g->launch_t, NULL); TRACE0...
2017 May 02
0
[PATCH v2] launch: Error if you try to launch with too many drives.
...error (g, _("the libguestfs handle has already been launched")); return -1; } + /* Too many drives? + * + * Some backends such as ?unix:? don't allow us to query max_disks. + * Don't fail in this case. + */ + guestfs_push_error_handler (g, NULL, NULL); + r = guestfs_max_disks (g); + guestfs_pop_error_handler (g); + if (r >= 0 && g->nr_drives > (size_t) r) { + error (g, _("too many drives have been added, the current backend only supports %d drives"), r); + return -1; + } + /* Start the clock ... */ gettimeofday (&g->laun...
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 Jul 21
5
[PATCH 1/5] mount: add a macro to resolve path or device
Add a macro DUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/daemon.h | 18 ++++++++++++++++++ daemon/mount.c | 13 ++----------- po/POTFILES | 8 ++++++++ 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 85eec45..39cc3f3 100644 --- a/daemon/daemon.h +++
2015 Jan 13
3
[PATCH] mkfs: add 'label' optional argument
...;; ""; ""; "NOARG"]; ["set_label"; "/dev/sda1"; "testlabel2"]; ["vfs_label"; "/dev/sda1"]], "testlabel2"), []; InitPartition, Always, TestLastFail ( @@ -10485,7 +10489,7 @@ call C<guestfs_max_disks>." }; tests = [ InitEmpty, Always, TestResult ( [["part_disk"; "/dev/sda"; "mbr"]; - ["mkfs"; "xfs"; "/dev/sda1"; ""; "NOARG"; ""; ""]; + ["mkfs&quo...
2012 Jul 23
1
[PATCH V3 1/2] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/mount.c | 25 +++++++++++++++++++++++-- generator/generator_actions.ml | 23 ++++++++++++----------- gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git
2012 Jul 16
2
[PATCH V4] NEW API: add new api xfs_info
...ions.ml b/generator/generator_actions.ml index c83bf70..dd9ea03 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -8995,6 +8995,14 @@ be returned if you called C<guestfs_list_devices>. To find out the maximum number of devices that could be added, call C<guestfs_max_disks>." }; + { defaults with + name = "xfs_info"; + style = RStruct ("info", "xfsinfo"), [Pathname "path"], []; + proc_nr = Some 337; + shortdesc = "get geometry of XFS filesystem"; + longdesc = "\ +This functions can prin...
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
...IMIT_NOFILE) + * + * =back + */ +static ssize_t +get_max_disks (guestfs_h *g) +{ + ssize_t ret; + struct rlimit rlim; + /* We reserve a little bit of "headroom" because qemu uses more + * file descriptors than just the disk files. + */ + const unsigned fd_headroom = 32; + + ret = guestfs_max_disks (g); + if (ret == -1) + return -1; + + if (getrlimit (RLIMIT_NOFILE, &rlim) == -1) { + perror ("getrlimit: RLIMIT_NOFILE"); + return -1; + } + if (rlim.rlim_cur > fd_headroom) { + if ((size_t) ret > rlim.rlim_cur - fd_headroom) { + if (rlim.rlim_max > rl...
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.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...;index", [Device "device"], []; + style = RInt "index", [String (Device, "device")], []; tests = [ InitEmpty, Always, TestResult ( [["device_index"; "/dev/sda"]], "ret == 0"), [] @@ -7651,7 +7651,7 @@ call C<guestfs_max_disks>." }; { defaults with name = "xfs_info"; added = (1, 19, 21); - style = RStruct ("info", "xfsinfo"), [Dev_or_Path "pathordevice"], []; + style = RStruct ("info", "xfsinfo"), [String (Dev_or_Path, "pathordevice...
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.