git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 'make extra-tests' rule and run extra tests.
[libguestfs.git]
/
resize
/
progress_c.c
diff --git
a/resize/progress_c.c
b/resize/progress_c.c
index
dddf787
..
2f25bbc
100644
(file)
--- a/
resize/progress_c.c
+++ b/
resize/progress_c.c
@@
-13,7
+13,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139,
USA.
+ * Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*/
#include <config.h>
*/
#include <config.h>
@@
-53,18
+53,22
@@
static struct custom_operations progress_bar_custom_operations = {
};
value
};
value
-virt_resize_progress_bar_init (value
unit
v)
+virt_resize_progress_bar_init (value
machine_readable
v)
{
{
- CAMLparam1 (
unit
v);
+ CAMLparam1 (
machine_readable
v);
CAMLlocal1 (barv);
struct progress_bar *bar;
CAMLlocal1 (barv);
struct progress_bar *bar;
+ int machine_readable = Bool_val (machine_readablev);
+ unsigned flags = 0;
/* XXX Have to do this to get nl_langinfo to work properly. However
* we should really only call this from main.
*/
setlocale (LC_ALL, "");
/* XXX Have to do this to get nl_langinfo to work properly. However
* we should really only call this from main.
*/
setlocale (LC_ALL, "");
- bar = progress_bar_init (0);
+ if (machine_readable)
+ flags |= PROGRESS_BAR_MACHINE_READABLE;
+ bar = progress_bar_init (flags);
if (bar == NULL)
caml_raise_out_of_memory ();
if (bar == NULL)
caml_raise_out_of_memory ();