X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fparse_opt.h;h=e132b1cd979961cb534608d5721cbf38fa21781a;hp=6b9fb5eb914abbae0203ebf04268a1f70d5f31cb;hb=0dcb83a870926de215307472676096056dabc9b0;hpb=36f52a8946387d05f307b5c4c8364d00155ae186 diff --git a/utils/mount/parse_opt.h b/utils/mount/parse_opt.h index 6b9fb5e..e132b1c 100644 --- a/utils/mount/parse_opt.h +++ b/utils/mount/parse_opt.h @@ -21,31 +21,35 @@ * */ -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, -}; - -enum { - PO_KEY2_RIGHTMOST = 1, - PO_KEY1_RIGHTMOST = -1, -}; + PO_BAD_VALUE = 2, +} po_found_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 *); +unsigned int po_rightmost(struct mount_options *, + const char *keys[]); +po_found_t po_remove_all(struct mount_options *, char *); void po_destroy(struct mount_options *); + +#endif /* _NFS_UTILS_PARSE_OPT_H */