X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Ferror.c;h=3f7458c96ed0574ff3237ba0ac77a077642b3606;hp=cab84c97125ab88df4921fc995c7d4b20f2eaea6;hb=4398901d336340f5bef59991d4cea77b2970f2fe;hpb=53a9b4a2ea971d5718ccfcc2f2825ff9af81cd23 diff --git a/utils/mount/error.c b/utils/mount/error.c index cab84c9..3f7458c 100644 --- a/utils/mount/error.c +++ b/utils/mount/error.c @@ -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; @@ -121,6 +130,13 @@ void mount_errors(char *server, int will_retry, int bg) fprintf(stderr, "%s\n", errbuf); } +/* + * mount_error - report a foreground mount error + * @spec: C string containing the device name being mounted + * @mount_point: C string containing the pathname of the local mounted on dir + * @error: errno value to report + * + */ void mount_error(const char *spec, const char *mount_point, int error) { switch(error) { @@ -148,7 +164,10 @@ void mount_error(const char *spec, const char *mount_point, int error) } /* - * Report a failed umount + * umount_error - report a failed umount request + * @err: errno value to report + * @dev: C string containing the pathname of the local mounted on dir + * */ void umount_error(int err, const char *dev) {