Displaying 2 results from an estimated 2 matches for "check_nbd_error".
2019 Oct 12
3
[PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
...+ free (fuse_options);
+
+ exit (r == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+}
+
+/* Wraps calls to libnbd functions and automatically checks for a
+ * returns errors in the format required by FUSE. It also prints out
+ * the full error message on stderr, so that we don't lose it.
+ */
+#define CHECK_NBD_ERROR(CALL) \
+ do { if ((CALL) == -1) return check_nbd_error (); } while (0)
+static int
+check_nbd_error (void)
+{
+ int err;
+
+ fprintf (stderr, "%s\n", nbd_get_error ());
+ err = nbd_get_errno ();
+ if (err != 0)
+ return -err;
+ else
+ return...
2019 Oct 14
0
Re: [PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
...+
> +/* Wraps calls to libnbd functions and automatically checks for a
> + * returns errors in the format required by FUSE. It also prints out
Missing a word or two after 'checks for a'
> + * the full error message on stderr, so that we don't lose it.
> + */
> +#define CHECK_NBD_ERROR(CALL) \
> + do { if ((CALL) == -1) return check_nbd_error (); } while (0)
> +static int
> +check_nbd_error (void)
> +{
> + int err;
> +
> + fprintf (stderr, "%s\n", nbd_get_error ());
> + err = nbd_get_errno ();
> + if (err...