Displaying 11 results from an estimated 11 matches for "notify_progress".
2010 Jul 02
1
Progress bars
...--------
Long running calls tend to be of two forms:
while (n < size) {
copy_a_buffer ();
n += size_copied;
}
or:
command ("long_running_external_command");
The first form can be changed easily:
while (n < size) {
copy_a_buffer ();
n += size_copied;
notify_progress (n, size);
}
The 'notify_progress' function can be called as often as needed, and
it would have to contain its own rate limiting functionality so that
it doesn't actually send progress messages back more often than
desired (eg. once per second). This allows for a very simple change...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch:
https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html
This adds OCaml and Perl bindings (both tested), support for
progress bars in virt-resize, and adds progress notifications
to a number of the simpler commands.
Still to do is to add progress messages to more commands. There
are still a few commands which would be
2015 Jun 16
1
[PATCH v3] Improve fixed appliance documentation
...Patches to port supermin to more Linux distros are welcome.
diff --git a/src/guestfs.pod b/src/guestfs.pod
index fa04c86..a524fdf 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -3795,6 +3795,43 @@ The daemon self-limits the frequency of progress messages it sends
(see C<daemon/proto.c:notify_progress>). Not all calls generate
progress messages.
+=head2 FIXED APPLIANCE
+
+When libguestfs (or libguestfs tools) are run, they search a path
+looking for an appliance. The path is built into libguestfs, or can
+be set using the C<LIBGUESTFS_PATH> environment variable.
+
+Normally a super...
2016 Nov 02
0
[PATCH 2/6] New API: yara_load
...ss, -1 on error.
+ */
+static int
+write_callback (void *data_vp, const void *buf, size_t len)
+{
+ int ret;
+ struct write_callback_data *data = data_vp;
+
+ ret = xwrite (data->fd, buf, len);
+ if (ret == -1)
+ return -1;
+
+ data->written += len;
+
+ if (progress_hint > 0)
+ notify_progress (data->written, progress_hint);
+
+ return 0;
+}
+
+int
+optgroup_libyara_available (void)
+{
+ return 1;
+}
+
+#else /* !HAVE_LIBYARA */
+
+OPTGROUP_LIBYARA_NOT_AVAILABLE
+
+#endif /* !HAVE_LIBYARA */
diff --git a/generator/actions.ml b/generator/actions.ml
index 91a1819..14659bd 100644
--...
2016 Nov 09
0
[PATCH v2 2/6] New API: yara_load
...ss, -1 on error.
+ */
+static int
+write_callback (void *data_vp, const void *buf, size_t len)
+{
+ int ret;
+ struct write_callback_data *data = data_vp;
+
+ ret = xwrite (data->fd, buf, len);
+ if (ret == -1)
+ return -1;
+
+ data->written += len;
+
+ if (progress_hint > 0)
+ notify_progress (data->written, progress_hint);
+
+ return 0;
+}
+
+/* Yara compilation error callback.
+ * Reports back the compilation error message.
+ * Prints compilation warnings if verbose.
+ */
+static void
+compile_error_callback(int level, const char *name, int line,
+ const char...
2015 Nov 09
6
[PATCH 0/5] build: Enable some more warnings.
Add some warnings. Well, the first patch is a miscellaneous
change, but patches 2-5 add some warnings.
Rich.
2016 Nov 02
8
[PATCH 0/6] Feature: Yara file scanning
Yara is a rule based scanning engine aimed to help malware analysts in finding and classifying interesting samples.
https://github.com/VirusTotal/yara
This series adds Yara support to Libguestfs allowing to upload sets of rules and scanning files against them.
Currently provided APIs:
- yara_load: loads a set of rules
- yara_destroy: free resources allocated by loaded rules
- yara_scan:
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’
2016 Nov 09
9
[PATCH v2 0/6] Feature: Yara file scanning
v2:
- Fix yara dependency in packagelist
- Use pkg-config where available
- Improve longdesc of yara_load API
- Fix libyara initialization and finalization
- Import CLEANUP_FCLOSE
- Add custom CLEANUP_DESTROY_YARA_COMPILER
- Add rules compilation error callback
- Other small fixes according to comments
Matteo Cafasso (6):
appliance: add yara dependency
New API: yara_load
New API:
2011 Mar 10
1
[PATCH for discussion only] New event API (RHBZ#664558).
...(see
-C<guestfs_set_progress_callback>) if there is a callback registered,
-or discards them if not.
+L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or
+discards them if not.
The daemon self-limits the frequency of progress messages it sends
(see C<daemon/proto.c:notify_progress>). Not all calls generate
diff --git a/src/proto.c b/src/proto.c
index 549734b..6a0fbbf 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -193,8 +193,7 @@ child_cleanup (guestfs_h *g)
g->recoverypid = 0;
memset (&g->launch_t, 0, sizeof g->launch_t);
g->state = CONFIG;
- if...
2015 Oct 29
16
[PATCH 00/16] Refactoring of configure.ac and guestfs.pod
Two (not related to each other) refactorings:
Patches 1-12 split configure.ac into smaller files using the
m4_include mechanism.
Patches 13-15 split out parts of guestfs.pod (ie. guestfs(3)) into
three new manual pages:
guestfs-hacking(3) - how to extend and contribute to libguestfs
guestfs-internals(3) - architecture and internals
guestfs-security(3) - security and CVEs
Patch 16 is a