mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-22 03:47:22 +08:00
rtemsbsd/nfsclient: Fix the error code return value
This commit is contained in:
parent
6ee31ae968
commit
87a5b45564
@ -963,16 +963,16 @@ rtems_nfs_initialize(
|
|||||||
tryret = nfs_tryproto(ai, &args);
|
tryret = nfs_tryproto(ai, &args);
|
||||||
if (tryret == TRYRET_SUCCESS) {
|
if (tryret == TRYRET_SUCCESS) {
|
||||||
error = nfs_trymount(mt_entry, ai, &args, fspath, data);
|
error = nfs_trymount(mt_entry, ai, &args, fspath, data);
|
||||||
if (RTEMS_DEBUG)
|
if (RTEMS_DEBUG)
|
||||||
printf("nfs: mount: (%d) %s\n", error, strerror(error));
|
printf("nfs: mount: (%d) %s\n", error, strerror(error));
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
error = EIO;
|
error = EIO;
|
||||||
if (RTEMS_DEBUG)
|
if (RTEMS_DEBUG)
|
||||||
printf("nfs: mount: %s\n", args.errstr);
|
printf("nfs: mount: %s\n", args.errstr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
freeaddrinfo(args.ai_nfs);
|
freeaddrinfo(args.ai_nfs);
|
||||||
|
|
||||||
@ -984,6 +984,7 @@ out:
|
|||||||
if (fspath != NULL) {
|
if (fspath != NULL) {
|
||||||
rtems_bsd_rootfs_rmdir(fspath);
|
rtems_bsd_rootfs_rmdir(fspath);
|
||||||
}
|
}
|
||||||
|
rtems_set_errno_and_return_minus_one(error);
|
||||||
}
|
}
|
||||||
return error;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user