Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2014 14:21:00 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Edward Tomasz Napierala <trasz@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r271753 - head/sys/fs/autofs
Message-ID:  <20140918112100.GS2161@kib.kiev.ua>
In-Reply-To: <201409181033.s8IAXNZ1054205@svn.freebsd.org>
References:  <201409181033.s8IAXNZ1054205@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--IpljlC28XhFjURzf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> Log:
>   Fix typos.
>  =20
>   Sponsored by:	The FreeBSD Foundation
>=20
> Modified:
>   head/sys/fs/autofs/autofs.c
>=20
> Modified: head/sys/fs/autofs/autofs.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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 !=3D 0) {
>  				/*
> -				 * XXX: For some reson this returns -1
> +				 * XXX: For some reason this returns -1
>  				 *	instead of EINTR, wtf?!
>  				 */
>  				error =3D EINTR;
> @@ -542,7 +542,7 @@ autofs_ioctl_request(struct autofs_daemo
>  		    &autofs_softc->sc_lock);
>  		if (error !=3D 0) {
>  			/*
> -			 * XXX: For some reson this returns -1 instead
> +			 * XXX: For some reason this returns -1 instead
>  			 * 	of EINTR, wtf?!
>  			 */
>  			error =3D 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.

--IpljlC28XhFjURzf
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJUGsAcAAoJEJDCuSvBvK1BJZcP/1V0BdWox5Ac+PEPNSEu8pnX
GV+7+rhPPzadarXWf3qF0AM8wJFEwbbFZA4CvqQ1meSmCIdXVatYpcn0t5gQBtQI
cbOCJOzwhkCEFw2DgFEVh8gusFqEUZiNOLeFXa8d5ERtZboUX2OHIo5ewflgmEDq
St/piJda4DzE6v+9vm3ctI9iBf1IcIok9+UzNwtk6+fI1ZdurVmNDw6rLqNha3fD
kThy+SZNLzB83qJMJDiO57uiMRDeKaOxFSQD7bqy3gg9nk+fucAGC1LONIe6Z/QJ
G/H71cBE+e8JBvA21wKSb/RY9f3B59ErnZYOva0Hey5fnBqcEs8BrYTlwdgfcKJE
Cjn1aSCqlW5VcmkRn0m3qgyb0eMoIGCtTkpeM02D+TKfq+R2fuxnqJd4hcqBrwS1
D4Q4AXDktBsjbVZQIdL4YE0sj1F1h3k3hsBRSFWsEuPvZAaIGVG1mos1iULh6+3G
kxzV0OzY/ANuAsLkWwcELa5qrWwvIAUJMHBBw7GCBGDo95Egw0ij2lY5E1ABGyad
NaWIYfdMkVRQqIJ/lFxZhkbW9kM+qBD6woOTPUDzB8a3zLF30lmEZaqYlpHI24T5
SK/juzM3id4FdjpnOpPGnZwNSiD6HmKloq9Ako4TYDkEgQQ+GOCngA5odcLfmurB
j9pmQImjJ9Ud1HiDGzo/
=Oi6+
-----END PGP SIGNATURE-----

--IpljlC28XhFjURzf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140918112100.GS2161>