diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-10-10 15:06:30 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-10-11 11:03:17 +1000 |
commit | 36f52a8946387d05f307b5c4c8364d00155ae186 (patch) | |
tree | a8f8cd7c8fb91026df90d68ec56c1de828912056 | |
parent | 7d31c6a73cf371cb05f7aab34a11a8acb627a85b (diff) | |
download | nfs-utils-36f52a8946387d05f307b5c4c8364d00155ae186.tar.gz nfs-utils-36f52a8946387d05f307b5c4c8364d00155ae186.tar.xz nfs-utils-36f52a8946387d05f307b5c4c8364d00155ae186.zip |
text-based mount.nfs: add a few useful parser return codes
I forgot to add symbolic return codes for po_rightmost(). Add return codes
for PO_KEY1_RIGHTMOST and PO_KEY2_RIGHTMOST.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | utils/mount/parse_opt.c | 4 | ||||
-rw-r--r-- | utils/mount/parse_opt.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/utils/mount/parse_opt.c b/utils/mount/parse_opt.c index fb4a0e4..f253142 100644 --- a/utils/mount/parse_opt.c +++ b/utils/mount/parse_opt.c @@ -394,9 +394,9 @@ int po_rightmost(struct mount_options *options, char *key1, char *key2) if (options) { for (option = options->tail; option; option = option->prev) { if (key2 && strcmp(option->keyword, key2) == 0) - return 1; + return PO_KEY2_RIGHTMOST; if (key1 && strcmp(option->keyword, key1) == 0) - return -1; + return PO_KEY1_RIGHTMOST; } } diff --git a/utils/mount/parse_opt.h b/utils/mount/parse_opt.h index 93430d9..6b9fb5e 100644 --- a/utils/mount/parse_opt.h +++ b/utils/mount/parse_opt.h @@ -31,6 +31,11 @@ enum { PO_FOUND = 1, }; +enum { + PO_KEY2_RIGHTMOST = 1, + PO_KEY1_RIGHTMOST = -1, +}; + struct mount_options; struct mount_options * po_split(char *); |