Displaying 4 results from an estimated 4 matches for "iso_get_ready".
2020 Apr 09
2
Re: [PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...parse so extents probably isn't that useful.
True, but it can't hurt ;)
> ---
> plugins/iso/Makefile.am | 4 +-
> plugins/iso/iso.c | 99 +++++++++++++++++++----------------------
> 2 files changed, 48 insertions(+), 55 deletions(-)
>
> @@ -193,25 +195,43 @@ iso_get_ready (void)
> static void *
> iso_open (int readonly)
> {
> - return NBDKIT_HANDLE_NOT_NEEDED;
> + struct fileops *fops;
> + int fd;
> +
> + fops = malloc (sizeof *fops);
> + if (fops == NULL) {
> + nbdkit_error ("malloc: %m");
> + return NULL;...
2020 Apr 09
0
[PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...%d", iso_fd);
if (fclose (fp) == EOF) {
nbdkit_error ("memstream failed: %m");
@@ -128,8 +130,8 @@ iso_unload (void)
free (dirs[i]);
free (dirs);
- if (fd >= 0)
- close (fd);
+ if (iso_fd >= 0)
+ close (iso_fd);
}
static int
@@ -193,25 +195,43 @@ iso_get_ready (void)
static void *
iso_open (int readonly)
{
- return NBDKIT_HANDLE_NOT_NEEDED;
+ struct fileops *fops;
+ int fd;
+
+ fops = malloc (sizeof *fops);
+ if (fops == NULL) {
+ nbdkit_error ("malloc: %m");
+ return NULL;
+ }
+
+ /* Copy the fd because fileops needs to have it...
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message
for patch 3.
Rich.
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete
method before to do two different things (complete configuration; do
any allocation/housekeeping necessary before we can start serving).
The only questions in my mind are whether we want this before 1.18,
and whether the name ("get_ready") is a good one.
Rich.