Use SEEK_{SET,CUR,END} for file seek "whence"

Use either SEEK_* or 0,1,2..., but not both.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #8656
This commit is contained in:
Tomohiro Kusumi
2019-04-26 02:17:28 +09:00
committed by Brian Behlendorf
parent f4c594da94
commit 126d0fa733
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -426,7 +426,7 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag,
int fstrans;
#endif
if (cmd != F_FREESP || bfp->l_whence != 0)
if (cmd != F_FREESP || bfp->l_whence != SEEK_SET)
return (EOPNOTSUPP);
ASSERT(vp);