Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Jan 2011 22:21:51 +0300
From:      Anonymous <swell.k@gmail.com>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: No human readable message with g_vfs
Message-ID:  <8639p923ow.fsf@gmail.com>
In-Reply-To: <20110103190245.4AA005B30@mail.bitblocks.com> (Bakul Shah's message of "Mon, 03 Jan 2011 11:02:45 -0800")
References:  <4D1B0E41.40405@gmail.com> <ifsi3f$5ub$1@dough.gmane.org> <4D21CC35.5060803@gmx.de> <20110103141830.GC3140@deviant.kiev.zoral.com.ua> <47B52F19-AB6B-4116-9F5E-219B26519115@FreeBSD.org> <F5FB1B76-21A9-42E6-8294-BA4F6E8EA8DA@gmail.com> <86vd256e85.fsf@gmail.com> <20110103190245.4AA005B30@mail.bitblocks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bakul Shah <bakul@bitblocks.com> writes:

> On Mon, 03 Jan 2011 21:20:42 +0300 Anonymous <swell.k@gmail.com>  wrote:
>>=20
>> Do you mean perror(1)?
>>=20
>>   $ perror 5
>>   Input/output error
>
> I prefer mine:
>
> $ errno () { grep "^#.*\\<$*\\>" /usr/include/sys/errno.h }
> $ errno 5
> #define EIO             5               /* Input/output error */
> $ errno EIO
> #define EIO             5               /* Input/output error */

perror(1) displays localized messages

  $ LANG=3Dja_JP.UTF-8 perror 5
  =E5=85=A5=E5=87=BA=E5=8A=9B=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=A7=E3=81=99

  $ LANG=3Duk_UA.UTF-8 perror 5
  =D0=9F=D0=BE=D0=BC=D0=B8=D0=BB=D0=BA=D0=B0 =D0=B2=D0=B2=D0=BE=D0=B4=D1=83=
-=D0=B2=D0=B8=D0=B2=D0=BE=D0=B4=D1=83

but I have to agree that knowing errno macro is useful



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