From owner-svn-src-all@freebsd.org Wed Feb 21 02:19:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5921F20952; Wed, 21 Feb 2018 02:19:15 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64A1E7E4AF; Wed, 21 Feb 2018 02:19:15 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f44.google.com with SMTP id l191so214781lfe.1; Tue, 20 Feb 2018 18:19:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wQbK4gr5+mSFrk/q0iEa49w+TYKHygxNFRrL00TJKwU=; b=Ohn0RwbkYEzBdDZmiI1mDbKYd87PYUlvE1vQOypYnxRQdtc0+XWHXA+PufNfVTtDZR 5UtJV2J2nLcLqCQBqVmkNAsRQYU9g1ipXgUnlXR5j07lxF7QKfqLUBtdeosrXOGyfizJ 3MG8950+rKArjVKPa4ytzVFyK/NYj0bm2H41HL9aK/CKdmq6xSRTF9t9RnONbwOWioZq rPPqJd17Ln3ELYwCnltldSQ31JIKIO1Jqk5FlazCf+cMkg/VUFe8YYLLOp16DUMBTQhM 2I6IwWYm5/pADiIj8bf1vxtX3oNeb/laHd5DEcD55H7tXfxUdhbXPuRTqDwCX+fmN+Qp NQBQ== X-Gm-Message-State: APf1xPDuWaCVVeKmB3Xe0V7aweIO8XB7DscXabHn6+WYxKu+ZTYV2aEB xFAKuwUO8v1nNUtmH2ZJa8xmyY84 X-Google-Smtp-Source: AH8x226c9rrcsYJU77/PGspIL9AWC7CXcdV4HYVONleWNRarBG+vYzmPVSQrx7yzWBc/OFwY9JidUg== X-Received: by 10.25.199.151 with SMTP id x145mr1195455lff.33.1519179547587; Tue, 20 Feb 2018 18:19:07 -0800 (PST) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com. [209.85.215.49]) by smtp.gmail.com with ESMTPSA id d82sm4963957lfl.66.2018.02.20.18.19.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 18:19:07 -0800 (PST) Received: by mail-lf0-f49.google.com with SMTP id 70so207458lfw.2; Tue, 20 Feb 2018 18:19:07 -0800 (PST) X-Received: by 10.25.158.149 with SMTP id h143mr22980lfe.129.1519179547085; Tue, 20 Feb 2018 18:19:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.46.106.8 with HTTP; Tue, 20 Feb 2018 18:18:46 -0800 (PST) In-Reply-To: References: <201802201821.w1KILUUg079715@repo.freebsd.org> From: Kyle Evans Date: Tue, 20 Feb 2018 20:18:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r329649 - head/stand/liblua To: Oliver Pinter Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 02:19:16 -0000 On Tue, Feb 20, 2018 at 2:48 PM, Oliver Pinter wrote: > On Tuesday, February 20, 2018, Conrad Meyer wrote: > >> Author: cem >> Date: Tue Feb 20 18:21:30 2018 >> New Revision: 329649 >> URL: https://svnweb.freebsd.org/changeset/base/329649 >> >> Log: >> Lua lfs.attributes: Provide a more consistent error return >> >> In the remaining error case, return a 3-tuple consistent with the other >> error return case. >> >> Document how to invoke lfs.attributes() and detect/decode error return in >> example comments. >> >> Reviewed by: kevans >> Sponsored by: Dell EMC Isilon >> Differential Revision: https://reviews.freebsd.org/D14451 >> >> Modified: >> head/stand/liblua/lfs.c >> >> Modified: head/stand/liblua/lfs.c >> ============================================================ >> ================== >> --- head/stand/liblua/lfs.c Tue Feb 20 18:12:07 2018 (r329648) >> +++ head/stand/liblua/lfs.c Tue Feb 20 18:21:30 2018 (r329649) >> @@ -80,13 +80,20 @@ __FBSDID("$FreeBSD$"); >> * (etc.) >> * >> * The other available API is lfs.attributes(), which functions somewhat >> like >> - * stat(2) and returns a table of values: >> + * stat(2) and returns a table of values. Example code: >> * >> - * for k, v in pairs(lfs.attributes("/boot")) do >> + * attrs, errormsg, errorcode = lfs.attributes("/boot") >> + * if attrs == nil then >> + * print(errormsg) >> + * return errorcode >> + * end >> + * >> + * for k, v in pairs(attrs) do >> * print(k .. ":\t" .. v) >> * end >> + * return 0 > > > Hi! > > Missing ; at the end of lines here. Hi, Thanks for pointing that out! =) Just FYI, our semicolon termination policy was pretty unnatural for Lua, so we've dropped it as of r329686 and all other instances of trailing semicolons should have been axed as of r329684. Thanks, Kyle Evans