X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fparse_opt.h;h=199630f85625b69d8d5074e95450e4ac5cd15a67;hp=93430d99ce0d03732b177b12f713301ef3968db3;hb=b5009d23525181846777349f2fc0e4a72b89d24d;hpb=2ab6ed792a773751d1f5d60d13a06161559c0e54 diff --git a/utils/mount/parse_opt.h b/utils/mount/parse_opt.h index 93430d9..199630f 100644 --- a/utils/mount/parse_opt.h +++ b/utils/mount/parse_opt.h @@ -21,26 +21,40 @@ * */ -enum { +#ifndef _NFS_UTILS_PARSE_OPT_H +#define _NFS_UTILS_PARSE_OPT_H + +typedef enum { PO_FAILED = 0, PO_SUCCEEDED = 1, -}; +} po_return_t; -enum { +typedef enum { PO_NOT_FOUND = 0, PO_FOUND = 1, -}; + PO_BAD_VALUE = 2, +} po_found_t; + +typedef enum { + PO_KEY1_RIGHTMOST = -1, + PO_NEITHER_FOUND = 0, + PO_KEY2_RIGHTMOST = 1, +} po_rightmost_t; struct mount_options; struct mount_options * po_split(char *); void po_replace(struct mount_options *, struct mount_options *); -int po_join(struct mount_options *, char **); +po_return_t po_join(struct mount_options *, char **); -int po_append(struct mount_options *, char *); -int po_contains(struct mount_options *, char *); +po_return_t po_append(struct mount_options *, char *); +po_found_t po_contains(struct mount_options *, char *); char * po_get(struct mount_options *, char *); -int po_rightmost(struct mount_options *, char *, char *); -int po_remove_all(struct mount_options *, char *); +po_found_t po_get_numeric(struct mount_options *, + char *, long *); +po_rightmost_t po_rightmost(struct mount_options *, char *, char *); +po_found_t po_remove_all(struct mount_options *, char *); void po_destroy(struct mount_options *); + +#endif /* _NFS_UTILS_PARSE_OPT_H */