summaryrefslogtreecommitdiffstats
path: root/fish/fish.h
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-28 12:49:55 +0100
committerRichard Jones <rjones@redhat.com>2010-09-01 14:20:02 +0100
commit54837f6d7ba83178625e2f0c3c063457d9f3f79c (patch)
tree5e42d9ea94780b63007edd18e15ec56791b8b719 /fish/fish.h
parent3003df6bbc889c3939e6c478462dc4478d5b89f7 (diff)
downloadlibguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.tar.gz
libguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.tar.xz
libguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.zip
fish: Implement progress bars in guestfish.
The progress bar is updated 3 times per second, and is not displayed at all for operations which take less than two seconds. You can disable progress bars by using the flag --no-progress-bars, and you can enable progress bars in non-interactive sessions with the flag --progress-bars. A good way to test this is to use the following command: guestfish --progress-bars \ -N disk:10G \ zero-device /dev/sda (adjust "10G" to get different lengths of time).
Diffstat (limited to 'fish/fish.h')
-rw-r--r--fish/fish.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fish/fish.h b/fish/fish.h
index 81066104..be357f5d 100644
--- a/fish/fish.h
+++ b/fish/fish.h
@@ -55,6 +55,7 @@ extern int verbose;
extern int command_num;
extern int utf8_mode;
extern int have_terminfo;
+extern int progress_bars;
extern const char *libvirt_uri;
extern int issue_command (const char *cmd, char *argv[], const char *pipe);
extern void pod2text (const char *name, const char *shortdesc, const char *body);
@@ -122,6 +123,10 @@ extern prep_data *create_prepared_file (const char *type_string,
extern void prepare_drive (const char *filename, prep_data *data,
const char *device);
+/* in progress.c */
+extern void reset_progress_bar (void);
+extern void progress_callback (guestfs_h *g, void *data, int proc_nr, int serial, uint64_t position, uint64_t total);
+
/* in rc.c (remote control) */
extern void rc_listen (void) __attribute__((noreturn));
extern int rc_remote (int pid, const char *cmd, int argc, char *argv[],