FEDFS_LOOKUP_JUNCTION reports FEDFS_ERR_INVAL if the specified
path doesn't exist. INVAL is a little broad: it could mean, for
example, that any one of the arguments is incorrect.

RFC 7533 does not have a "does not exist" error code. But it does
allow FEDFS_LOOKUP_JUNCTION to return FEDFS_ERR_NOTJUNCT. That seems
closer in spirit than FEDFS_ERR_INVAL.

XXX: I need to check FEDFS_CREATE_JUNCTION and FEDFS_DELETE_JUNCTION
with crazy pathnames as well.

Signed-off-by: Chuck Lever <[email protected]>
---
 src/fedfsd/svc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/fedfsd/svc.c b/src/fedfsd/svc.c
index c02daad..9198c69 100644
--- a/src/fedfsd/svc.c
+++ b/src/fedfsd/svc.c
@@ -888,9 +888,11 @@ fedfsd_svc_lookup_junction_1(SVCXPRT *xprt)
        case FEDFS_ERR_EXIST:
                break;
        case FEDFS_OK:
-       case FEDFS_ERR_NOTJUNCT:
                result.status = FEDFS_ERR_INVAL;
                goto out;
+       case FEDFS_ERR_INVAL:
+               result.status = FEDFS_ERR_NOTJUNCT;
+               goto out;
        default:
                goto out;
        }


_______________________________________________
fedfs-utils-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/fedfs-utils-devel

Reply via email to