svn commit: r271753 - head/sys/fs/autofs

Konstantin Belousov kostikbel at gmail.com
Thu Sep 18 11:21:06 UTC 2014


On Thu, Sep 18, 2014 at 10:33:23AM +0000, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Thu Sep 18 10:33:23 2014
> New Revision: 271753
> URL: http://svnweb.freebsd.org/changeset/base/271753
> 
> Log:
>   Fix typos.
>   
>   Sponsored by:	The FreeBSD Foundation
> 
> Modified:
>   head/sys/fs/autofs/autofs.c
> 
> Modified: head/sys/fs/autofs/autofs.c
> ==============================================================================
> --- head/sys/fs/autofs/autofs.c	Thu Sep 18 10:01:56 2014	(r271752)
> +++ head/sys/fs/autofs/autofs.c	Thu Sep 18 10:33:23 2014	(r271753)
> @@ -430,7 +430,7 @@ autofs_trigger_one(struct autofs_node *a
>  			autofs_restore_sigmask(&oldset);
>  			if (error != 0) {
>  				/*
> -				 * XXX: For some reson this returns -1
> +				 * XXX: For some reason this returns -1
>  				 *	instead of EINTR, wtf?!
>  				 */
>  				error = EINTR;
> @@ -542,7 +542,7 @@ autofs_ioctl_request(struct autofs_daemo
>  		    &autofs_softc->sc_lock);
>  		if (error != 0) {
>  			/*
> -			 * XXX: For some reson this returns -1 instead
> +			 * XXX: For some reason this returns -1 instead
>  			 * 	of EINTR, wtf?!
>  			 */
>  			error = EINTR;
The -1 is ERESTART, i.e. it is correct error value which indicates that
syscall return path must restart the syscall after the trip to userland.
This behaviour is controlled by SA_RESTART flag, see sigaction(2).

There are some syscalls, which explicitely deny restarting, mostly to
correctly handle timeout values, most prominent is select(2) family.

The comment above is definitely inappropriate, and translation of ERESTART
to EINTR may be wrong as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20140918/bbb3d4de/attachment.sig>


More information about the svn-src-head mailing list