mount.nfs: rename mount_errors()
Subsystems (2)
PATCH 6/19 mount.nfs: rename mount_errors()
The function mount_errors() actually reports RPC errors generated by the user-land RPC library. We're about to add a similar function for reporting system call errors via errno, so rename mount_errors() to be more specific about what it does.
Signed-off-by Chuck Lever <[email protected]>
---
utils/mount/error.c | 11 ++++++++++- utils/mount/error.h | 2 +- utils/mount/nfs4mount.c | 6 +++--- utils/mount/nfsmount.c | 10 +++++----- 4 files changed, 19 insertions(+), 10 deletions(-)
utils/mount/error.c +10 -1
@@ -76,7 +76,16 @@ static int rpc_strerror(int spos)return pos; } -void mount_errors (char *server,int will_retry,int bg) +/** +* rpc_mount_errors - log an RPC error that occurred during a user-space mount +* @server: C string containing name of server we are attempting to mount +* @will_retry: one indicates mount will retry at some later point +* @bg: one indicates this is a background mount +* +* Extracts the error code from the user-space RPC library, and reports it +* on stderr (fg mount) or in the system log (bg mount). +*/ +void rpc_mount_errors (char *server,int will_retry,int bg) {int pos =0 ;char *tmp;
utils/mount/error.h +1 -1
@@ -24,5 +24,5 @@char *nfs_strerror (int );void mount_error (const char *,const char *,int ); -void mount_errors (char *,int ,int ); +void rpc_mount_errors (char *,int ,int );void umount_error (int ,const char *);
utils/mount/nfs4mount.c +3 -3
@@ -428,15 +428,15 @@ int nfs4mount(const char *spec, const char *node, int flags,if (errno ==ETIMEDOUT )break ;default : -mount_errors (hostname,0 , bg); +rpc_mount_errors (hostname,0 , bg); goto fail; } t =time (NULL );if (t >= timeout) { -mount_errors (hostname,0 , bg); +rpc_mount_errors (hostname,0 , bg); goto fail; } -mount_errors (hostname,1 , bg); +rpc_mount_errors (hostname,1 , bg);continue ; }
utils/mount/nfsmount.c +5 -5
@@ -688,15 +688,15 @@ nfsmount(const char *spec, const char *node, int flags,if (errno ==ETIMEDOUT )break ;default : -mount_errors (*nfs_server.hostname,0 , bg); +rpc_mount_errors (*nfs_server.hostname,0 , bg); goto fail; } t =time (NULL );if (t >= timeout) { -mount_errors (*nfs_server.hostname,0 , bg); +rpc_mount_errors (*nfs_server.hostname,0 , bg); goto fail; } -mount_errors (*nfs_server.hostname,1 , bg); +rpc_mount_errors (*nfs_server.hostname,1 , bg);continue ; }if (!running_bg) {
@@ -707,11 +707,11 @@ nfsmount(const char *spec, const char *node, int flags, } t =time (NULL );if (t >= timeout) { -mount_errors (*nfs_server.hostname,0 , bg); +rpc_mount_errors (*nfs_server.hostname,0 , bg); goto fail; }if (doonce++ <1 ) -mount_errors (*nfs_server.hostname,1 , bg); +rpc_mount_errors (*nfs_server.hostname,1 , bg); }if (nfs_pmap->pm_vers ==2 ) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs