]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/parse_opt.h
text-based mount.nfs: Fix po_rightmost() enum return values
[nfs-utils.git] / utils / mount / parse_opt.h
index 6b9fb5eb914abbae0203ebf04268a1f70d5f31cb..e7924ddf078ade1c0c337c00f96d66f468b89973 100644 (file)
  *
  */
 
-enum {
+typedef enum {
        PO_FAILED = 0,
        PO_SUCCEEDED = 1,
-};
+} po_return_t;
 
-enum {
+typedef enum {
        PO_NOT_FOUND = 0,
        PO_FOUND = 1,
-};
+} po_found_t;
 
-enum {
-       PO_KEY2_RIGHTMOST = 1,
+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_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 *);