From owner-svn-src-all@FreeBSD.ORG Fri May 10 18:01:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66494D30; Fri, 10 May 2013 18:01:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 5B286E47; Fri, 10 May 2013 18:01:29 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id q54so4220745wes.18 for ; Fri, 10 May 2013 11:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=w0eEqRn88ny0ViC38HDE3SSRgdmny6TENOY7GECJWB4=; b=G/6Vz+Rryrrw4oU3wK3oZwdrQ6xRoPrHvKR9w7S8tgpUuUk8jwsxeh6IGulDB7O7D7 HY2ROGpUCLBxbHUnR7+Q9GnViiegGyrDg1URV7oDm6sHl85b23Pou6JwN6IY90V2NTjD kVMYZeCFxUOqwfYO0NR+JRDXpSzd/bb7mcg8U0kb5ldzNh1lcbqd/uJjoXBGh21GkTF6 NdUiR5M7xsecbD5faVt3XQcLCiWHjkQQ/k7E0xnA0Dl54hnhNv9zwWklId9rhvi9SJPC f9khebYSF+ChruZrvE5adZNWxQ+nU9/hn/3xX2vc8844K0W9SNYji+cUAE4Nr4WKXY/a TaHQ== X-Received: by 10.194.248.200 with SMTP id yo8mr26352780wjc.36.1368208888584; Fri, 10 May 2013 11:01:28 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id e8sm4956671wic.5.2013.05.10.11.01.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 10 May 2013 11:01:27 -0700 (PDT) Date: Fri, 10 May 2013 20:01:25 +0200 From: Mateusz Guzik To: Eitan Adler Subject: Re: svn commit: r250462 - head/usr.bin/lockf Message-ID: <20130510180124.GA11396@dft-labs.eu> References: <201305101730.r4AHUUUs075105@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201305101730.r4AHUUUs075105@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 10 May 2013 18:01:30 -0000 On Fri, May 10, 2013 at 05:30:30PM +0000, Eitan Adler wrote: > Author: eadler > Date: Fri May 10 17:30:29 2013 > New Revision: 250462 > URL: http://svnweb.freebsd.org/changeset/base/250462 > > Log: > Add option to lockf to avoid creating a file if it does not exist. > Patch seems to be incomplete. > +.It Dv EX_UNAVAILABLE > +The > +.Fl n > +option is specified and the specified lock file does not exist. > .It Dv EX_USAGE > There was an error on the > .Nm > > > - if ((fd = open(name, O_RDONLY|O_CREAT|O_EXLOCK|flags, 0666)) == -1) { > + if ((fd = open(name, flags|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { > if (errno == EAGAIN || errno == EINTR) > return (-1); > err(EX_CANTCREAT, "cannot open %s", name); EX_UNAVAILABLE is never returned. -- Mateusz Guzik