Displaying 2 results from an estimated 2 matches for "mode_command".
2019 Oct 14
0
Re: [PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
...atbuf;
> +
> + if (stat (path, &statbuf) == -1)
> + return false;
> + return S_ISDIR (statbuf.st_mode);
Accepts a symlink-to-directory, but that's fine by me.
> +}
> +
> +int
> +main (int argc, char *argv[])
> +{
> + enum {
> + MODE_URI,
> + MODE_COMMAND,
> + MODE_FD,
> + MODE_SOCKET_ACTIVATION,
> + MODE_TCP,
> + MODE_UNIX,
> + } mode = MODE_URI;
> + enum {
> + HELP_OPTION = CHAR_MAX + 1,
> + FUSE_HELP_OPTION,
> + };
> + /* Note the "+" means we stop processing as soon as we get to the
&...
2019 Oct 12
3
[PATCH libnbd] nbdfuse: New tool to present a network block device in a FUSE filesystem.
...p;null_operations, NULL);
+ exit (EXIT_SUCCESS);
+}
+
+static bool
+is_directory (const char *path)
+{
+ struct stat statbuf;
+
+ if (stat (path, &statbuf) == -1)
+ return false;
+ return S_ISDIR (statbuf.st_mode);
+}
+
+int
+main (int argc, char *argv[])
+{
+ enum {
+ MODE_URI,
+ MODE_COMMAND,
+ MODE_FD,
+ MODE_SOCKET_ACTIVATION,
+ MODE_TCP,
+ MODE_UNIX,
+ } mode = MODE_URI;
+ enum {
+ HELP_OPTION = CHAR_MAX + 1,
+ FUSE_HELP_OPTION,
+ };
+ /* Note the "+" means we stop processing as soon as we get to the
+ * first non-option argument (the mountpoint) an...