From owner-freebsd-current@FreeBSD.ORG Mon Jan 3 18:41:46 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451DE106564A; Mon, 3 Jan 2011 18:41:46 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B29C58FC1D; Mon, 3 Jan 2011 18:41:45 +0000 (UTC) Received: by iwn39 with SMTP id 39so13893492iwn.13 for ; Mon, 03 Jan 2011 10:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=o6BmPgEgGx/6JqLrc0VB64uLBrOV7se0HtyX4vcSIXU=; b=WbxM7LpdqfGqGJ65exK5KiYX0GXToDYd6LjrZa5dfpejuiFFLBJNFn//ZSgh8m1Ojk DeQrQ162vEKiWXbDViZGQq/jkg4WzC/FMkLHBGXrNstQB0N0bi4Bzznfa8kPaqSjlKRO lc2BF6yLrMj30Li4DYQX7hMv6dGvaTi73/yho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=SzE0Bn/XeIm+G61GOYPS6z7tYCtbCyhzyITuB8ovMDUWjZKNQtuPOe01Djb5Pze9S1 rBPKkkIIbXL2I/QHck53njRNzgWbiMNrdqGzVZkDppspINS93ZQ3i3o76P529+ao4LXS VsL9FD9/w6ouSxTGxFYVCClRwSHwEh96YxAE8= Received: by 10.42.179.66 with SMTP id bp2mr15172230icb.81.1294080105162; Mon, 03 Jan 2011 10:41:45 -0800 (PST) Received: from [192.168.20.5] (c-24-130-151-210.hsd1.ca.comcast.net [24.130.151.210]) by mx.google.com with ESMTPS id ca7sm10723350icb.0.2011.01.03.10.41.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 10:41:43 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=utf-8 From: Garrett Cooper In-Reply-To: <86vd256e85.fsf@gmail.com> Date: Mon, 3 Jan 2011 10:41:40 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <00F09384-B3B3-44D2-9C93-029ED7BBB4EE@gmail.com> References: <4D1B0E41.40405@gmail.com> <4D21CC35.5060803@gmx.de> <20110103141830.GC3140@deviant.kiev.zoral.com.ua> <47B52F19-AB6B-4116-9F5E-219B26519115@FreeBSD.org> <86vd256e85.fsf@gmail.com> To: Anonymous X-Mailer: Apple Mail (2.1082) Cc: Kostik Belousov , Matthias Andree , =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= , "freebsd-current@freebsd.org" Subject: Re: No human readable message with g_vfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2011 18:41:46 -0000 On Jan 3, 2011, at 10:20 AM, Anonymous wrote: > Garrett Cooper writes: >=20 >> On Jan 3, 2011, at 8:33 AM, Edward Tomasz Napiera=C5=82a = wrote: >>=20 >>> Wiadomo=C5=9B=C4=87 napisana przez Kostik Belousov w dniu = 2011-01-03, o godz. 15:18: >>>> On Mon, Jan 03, 2011 at 02:16:37PM +0100, Matthias Andree wrote: >>>>> Am 03.01.2011 14:14, schrieb Ivan Voras: >>>>>> On 12/29/10 11:32, David Demelier wrote: >>>>>>> /var/log/messages.5.bz2:Nov 29 16:36:52 Abricot kernel: >>>>>>> g_vfs_done():ufs/public[READ(offset=3D232718991360, = length=3D131072)]error >>>>>>> =3D 5 >>>>>>>=20 >>>>>>> I think for a lambda user these are absolutely not = understandable. I >>>>>>=20 >>>>>> Would a better message be "WRITE error on da0, offset=3D34590720. >>>>>> length=3D65536, errno=3D5"? >>>>>=20 >>>>> nah, strerror(errno) isn't that much of an effort >>>> In kernel ? There is no strerror, and there is no great need to = import the >>>> sys_errlist. >>>=20 >>> I had code that adds strerror() to the kernel in one of my old p4 = branches. >>> Error messages like the one above look much better this way, but I = didn't >>> have time to push it into the tree, and there is a risk of yet = another i18n >>> discussion. If someone is interested - let me know; I'll try to = find it. >>=20 >> Some thoughts: >> - It's a pain to parse (before I just had to scan for an int -- now = it's a string?!?) >> - It slows down printing (slow kernel -> dog slow system). >> - Fills up logs quicker if a subsystem or piece of hardware is going >> south and these messages slam syslog, which means I have to scan more >> logs looking for useful data, the likelihood of messages being lost = in >> various buffers is higher, etc. >>=20 >> Why not just provide a more standard sensical printout for the >> messages and provide a secret decoder ring in userland or something >=20 > Do you mean perror(1)? >=20 > $ perror 5 > Input/output error Heh -- didn't realize that someone made a userland app for that libcall = already :D... You learn new things everyday I guess :). In that case IMO nothing needs to be done minus (if you're interested) = creating a parser that data mines stuff to make it more human readable = in a common format, i.e. error: 5 (Input/output error) that would make life when reporting PRs or issues on the list a lot more = uniform and easier to follow, and could apply to several utilities = (atacontrol, camcontrol, etc). My company has a similar in-house tool = that does that, but it's not necessarily the easiest tool to deal with = nor the most correct when it comes to some issues in FreeBSD. >> for interested parties the don't know that error is an errno value = (eg >> my mom and dad because they're unix illiterate), or just copyout all >> of the error data via an ioctl, print out the ioctl failures, and = skip >> the kernel level printing altogether? Thanks! -Garrett=