97a9a944b5887e91042b019776c41d5dd74557aferikabele * Fuse: Filesystem in Userspace
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive * This program can be distributed under the terms of the GNU LGPLv2.
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd * See the file COPYING.LIB
3f08db06526d6901aa08c110b5bc7dde6bc39905nd * Add an argument to the end of a fuse_args array. The second argument
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd * is copied.
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd args->argv = umem_alloc(sizeof (char *) * (args->argc + 1),
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (0);
5b10fd3977e6dfff19afe770e612e276962f7950nd * Insert an argument into an arbitrary slot in a fuse_args array. The
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd * third argument is copied.
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4ndfuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (0);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Drop an arbitrary argument from a fuse_args array.
06ba4a61654b3763ad65f52283832ebf058fdf1cslivefuse_opt_drop_arg(struct fuse_args *args, uint_t which)
06ba4a61654b3763ad65f52283832ebf058fdf1cslive args->argv = umem_alloc(sizeof (char *) * (args->argc + 1),
06ba4a61654b3763ad65f52283832ebf058fdf1cslive if (i != which) {
1937357c6969cbc6a1eb245e80faa6f3723cfa0awrowe umem_free(oldargs, sizeof (char *) * (args->argc + 2));
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Add an option to a comma-separated list of options. Initially,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * the first argument should be the address of a character pointer
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * pointing to NULL. This may be reused, and eventually freed
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * with libfuse_strfree().
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (-1);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (0);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (0);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Free a fuse_args structure.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive umem_free(args->argv, sizeof (char *) * (args->argc + 1));
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Shift the zeroth argument off of the fuse_args array, storing
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * it in the second argument. A pointer to the second argument is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * returned.
06ba4a61654b3763ad65f52283832ebf058fdf1cslivestatic char *
06ba4a61654b3763ad65f52283832ebf058fdf1cslivefuse_opt_shift_arg(struct fuse_args *args, char *buffer, int bufsiz)
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Process an argument according to the key, calling proc if necessary.
06ba4a61654b3763ad65f52283832ebf058fdf1cslivefuse_opt_proc(struct fuse_args *args, const char *arg, int key,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (0);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (1);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive return (1);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * Find the next matching option for the given argument. If an equal
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * sign or a space separates, set *sepp to the index.
06ba4a61654b3763ad65f52283832ebf058fdf1cslivestatic const struct fuse_opt *
06ba4a61654b3763ad65f52283832ebf058fdf1cslivefuse_opt_next_match(const struct fuse_opt *opts, const char *arg,
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh * Scan the input into the value, according to the format. If the
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh * format is %s, copy the string.
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndfuse_opt_scan(const char *input, const char *format, void *value)
rc = 0;
return (rc);
if (sep != 0) {
++post;
(void *)valp);
sizeof (buffy));
++opt;
return (save);
char **allopts)
return (rc);
char **allopts)
rc = 0;
rc = 0;
allopts);
allopts);
rc = 0;
return (rc);
* kept or discarded according to the rules laid out in fuse_opt.h.
sizeof (buffy)));
return (rc);