- /* We first try the new nfs syscall. */
- fh = getfh ((struct sockaddr *) sin, p);
- if (fh == NULL && errno == EINVAL)
- /* Let's try the old one. */
- fh = getfh_old ((struct sockaddr *) sin,
- stb.st_dev, stb.st_ino);
+ if (v3)
+ fh = getfh_size ((struct sockaddr *) sin, p, 64);
+ if (!v3 || (fh == NULL && errno == EINVAL)) {
+ /* We first try the new nfs syscall. */
+ fh = getfh ((struct sockaddr *) sin, p);
+ if (fh == NULL && errno == EINVAL)
+ /* Let's try the old one. */
+ fh = getfh_old ((struct sockaddr *) sin,
+ stb.st_dev, stb.st_ino);
+ }