commit 6842faafcd5ff2509d1c6e76d0b833f2dc420a46 from: Omar Polo date: Fri Dec 24 16:22:08 2021 UTC fix comments regarding fd and iomode iomode can be set to "garbage" and fd still be -1. To check if a fid was opened one _has_ to check the fd value. commit - aee90cdfd76a25cabc84e2bdee925a0a12bbfbf8 commit + 6842faafcd5ff2509d1c6e76d0b833f2dc420a46 blob - ebe01ee35020648e7c84e1fad5340f1bcdf3cbf9 blob + 69d8e205be0a8b4910b3547b9e86177025ebe76d --- client.c +++ client.c @@ -65,15 +65,14 @@ struct fid { char fpath[PATH_MAX]; /* - * 0 when the fid was not yet opened for I/O otherwise set to * the flags passed to open(2). O_CLOEXEC means ORCLOSE, that * is to unlink the file upon Tclunk. */ int iomode; /* - * if iomode is set, this fid was opened and fd represents its - * file descriptor. + * if fd is not -1 this fid was opened, fd represents its + * file descriptor and iomode the flags passed to open(2). */ int fd; DIR *dir;