From 34f1fd94b4a293b8572295aa2dc4e1facae0ec62 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 23 Aug 2001 14:21:26 +0000 Subject: Even better move: suppose that server is able to handle SEEK_END, so check arguments for all but not SEEK_END case, leaving SEEK_END handling for server --- sys/nfsclient/nfs_lock.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/nfsclient/nfs_lock.c') diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index 4e670f2..ac52410 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -104,12 +104,12 @@ nfs_dolock(ap) */ if (fl->l_len < 0) return (EINVAL); - if (fl->l_whence == SEEK_END) - return (EOPNOTSUPP); - if (fl->l_start < 0) - return (EINVAL); - if (fl->l_len != 0 && (fl->l_len - 1 > OFF_MAX - fl->l_start)) - return (EOVERFLOW); + if (fl->l_whence != SEEK_END) { + if (fl->l_start < 0) + return (EINVAL); + if (fl->l_len != 0 && (fl->l_len - 1 > OFF_MAX - fl->l_start)) + return (EOVERFLOW); + } /* * Fill in the information structure. -- cgit v1.1