Displaying 1 result from an estimated 1 matches for "free_percent".
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
...char *device, int mbytes);
which leaves no scope for extra parameters to be added. However in
other languages, it wouldn't be a problem, eg. in Perl you can
overload functions with additional arguments perfectly happily:
$g->lvresize (device, mbytes);
$g->lvresize (device, mbytes, free_percent => 50);
and this is true in most non-C languages.
The way to make this work is to generate C bindings differently. We
would still generate the (backwards-compatible) guestfs_lvresize
function as before, but we would generate an additional function
'guestfs_lvresize_opts' which could t...