search for: guestfs_free_dirent_list

Displaying 7 results from an estimated 7 matches for "guestfs_free_dirent_list".

2014 Nov 16
2
[PATCH] list-applications: Add support for pacman
...free (arch); + free (url); + name = version = desc = arch = url = NULL; + release = NULL; /* Haven't allocated memory for release */ + + if (fclose (fp) == -1) { + perrorf (g, "fclose: %s", desc_file); + goto out; + } + + } + + ret = apps; + + out: + guestfs_free_dirent_list (local_db); + + if (ret == NULL) + guestfs_free_application2_list (apps); + + return ret; +} + static void list_applications_windows_from_path (guestfs_h *g, struct guestfs_application2_list *apps, const char **path, size_t path_len); static struct guestfs_application2_list * -- 2.1.3
2014 Nov 16
0
Re: [PATCH] list-applications: Add support for pacman
...ch = url = NULL; > + release = NULL; /* Haven't allocated memory for release */ > + > + if (fclose (fp) == -1) { > + perrorf (g, "fclose: %s", desc_file); > + goto out; > + } > + > + } > + > + ret = apps; > + > + out: > + guestfs_free_dirent_list (local_db); Maybe use CLEANUP_FREE_DIRENT_LIST instead of having to call guestfs_free_dirent_list along the exit path? > + > + if (ret == NULL) > + guestfs_free_application2_list (apps); > + > + return ret; > +} > + > static void list_applications_windows_from_pa...
2014 Nov 17
2
Re: [PATCH] list-applications: Add support for pacman
...ven't allocated memory for release */ >> + >> + if (fclose (fp) == -1) { >> + perrorf (g, "fclose: %s", desc_file); >> + goto out; >> + } >> + >> + } >> + >> + ret = apps; >> + >> + out: >> + guestfs_free_dirent_list (local_db); > > Maybe use CLEANUP_FREE_DIRENT_LIST instead of having to call > guestfs_free_dirent_list along the exit path? > >> + >> + if (ret == NULL) >> + guestfs_free_application2_list (apps); >> + >> + return ret; >> +} >> + >&...
2012 Mar 28
2
[PATCH v2] New APIs: mount-local and umount-local using FUSE
This version doesn't crash or cause hung processes or stuck mountpoints, so that's an improvement. Rich.
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review. It enables FUSE support in the API via two new calls, 'guestfs_mount_local' and 'guestfs_umount_local'. FUSE turns out to be very easy to deadlock (necessitating that the machine be rebooted). Running the test from the third patch is usually an effective way to demonstrate this. However I have not yet managed to produce a simple reproducer that
2012 Mar 29
3
[PATCH v3] New APIs: mount-local, mount-local-run and umount-local using FUSE
This changes the proposed API slightly. Previously 'mount-local' generating a 'mounted' event when the filesystem was ready, and from the 'mounted' event you had to effectively do a fork. Now, 'mount-local' just initializes the mountpoint and you have to call 'mount-local-run' to enter the FUSE main loop. Between these calls you can do a fork or whatever
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...if (w == NULL) { - free_words (words, nr_words); - words = NULL; - nr_words = 0; - } - else { - words = w; - words[nr_words].name = p; - words[nr_words].is_dir = dirents->val[i].ftyp == 'd'; - nr_words++; - } - } - } - } - } - - guestfs_free_dirent_list (dirents); - } + dirents = guestfs_readdir (g, dir); + + /* Prepend directory to names before adding them to the list + * of words. + */ + if (dirents) { + size_t i; + + for (i = 0; i < dirents->len; ++i) { + int err; + +...