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;
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 *);
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;
}
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) {
}
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) {