Displaying 10 results from an estimated 10 matches for "cleanup_free_statns".
2017 Mar 03
0
[PATCH 07/11] tail: pass the right path for Windows guests
...ws paths can
be properly resolved.
---
cat/tail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cat/tail.c b/cat/tail.c
index 8785d45..51da5fc 100644
--- a/cat/tail.c
+++ b/cat/tail.c
@@ -309,7 +309,7 @@ do_tail (int argc, char *argv[], /* list of files in the guest */
CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
if (windows) {
- filename = windows_path (g, root, filename, 1 /* readonly */);
+ filename = windows_path (g, root, argv[i], 1 /* readonly */);
if (filename == NULL)
return -1; /* windows_path printed an error */...
2017 Mar 03
14
[PATCH 00/11] Various Coverity fixes
Hi,
this patch series fixes some issues discovered by Coverity.
Most of them are memory leaks, usually on error; there are also invalid
memory access issues.
Thanks,
Pino Toscano (11):
java: link libguestfs_jni against libutils
java: fix invalid memory access for FBuffer in struct lists
daemon: tsk: properly use GUESTFS_MAX_CHUNK_SIZE
edit: fix small memory leak on error
java: fix
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...struct tm *tm;
diff --git a/cat/visit.c b/cat/visit.c
index 2347b56..963beb8 100644
--- a/cat/visit.c
+++ b/cat/visit.c
@@ -51,11 +51,11 @@ _visit (guestfs_h *g, int depth, const char *dir,
* case.
*/
if (depth == 0) {
- CLEANUP_FREE_STAT struct guestfs_stat *stat = NULL;
+ CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
CLEANUP_FREE_XATTR_LIST struct guestfs_xattr_list *xattrs = NULL;
int r;
- stat = guestfs_lstat (g, dir);
+ stat = guestfs_lstatns (g, dir);
if (stat == NULL)
return -1;
@@ -71,14 +71,14 @@ _visit (guestfs_h *g, int depth, const ch...
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second
commit includes a simple test.
Rich.
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...+ if (drvt == (time_t)-1)
+ return -1;
+
+ while (!quit) {
+ time_t t;
+ int i;
+ int windows;
+ int processed;
+
+ if (add_and_mount (drvs, mps, &windows) == -1)
+ return -1;
+
+ /* Check files here. */
+ processed = 0;
+ for (i = 0; i < argc; ++i) {
+ CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
+
+ guestfs_push_error_handler (g, NULL, NULL);
+ stat = guestfs_statns (g, argv[i]);
+ guestfs_pop_error_handler (g);
+ if (stat == NULL) {
+ /* There's an error. Treat ENOENT as if the file was empty size. */
+ if (guestfs...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f)
on one or more log/text files inside the guest.
I've only done limited testing, but it works for me for tailing
various long-running builds inside guests which I'm doing at the
moment.
There are no tests at present.
Rich.
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...);
+ assert (roots[1] == NULL);
+ root = roots[0];
+
+ /* Windows? Special handling is required. */
+ windows = is_windows (g, root);
+ }
+
+ /* Check files here. */
+ processed = 0;
+ for (i = 0; i < argc; ++i) {
+ CLEANUP_FREE char *filename = NULL;
+ CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
+
+ if (windows) {
+ filename = windows_path (g, root, filename, 1 /* readonly */);
+ if (filename == NULL)
+ return -1; /* windows_path printed an error */
+ }
+ else {
+ filename = strdup (argv[i]);
+ if (file...
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
...) {
> + time_t t;
> + int i;
> + int windows;
> + int processed;
> +
> + if (add_and_mount (drvs, mps, &windows) == -1)
> + return -1;
> +
> + /* Check files here. */
> + processed = 0;
> + for (i = 0; i < argc; ++i) {
> + CLEANUP_FREE_STATNS struct guestfs_statns *stat = NULL;
> +
> + guestfs_push_error_handler (g, NULL, NULL);
> + stat = guestfs_statns (g, argv[i]);
> + guestfs_pop_error_handler (g);
> + if (stat == NULL) {
> + /* There's an error. Treat ENOENT as if the file was empty...
2016 Oct 03
3
[PATCH v3 0/2] New tool: virt-tail.
Since v2:
- Fix the things that Pino mentioned, except the recursion.
- Implement Windows support.
For Windows support to be sane, I had to inline the add_and_mount code.
Rich.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.