From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwHAz-0004OL-R4 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 10:42:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwHAv-0004M2-5c for qemu-devel@nongnu.org; Tue, 21 Apr 2009 10:42:21 -0400 Received: from [199.232.76.173] (port=37661 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwHAu-0004Lw-UW for qemu-devel@nongnu.org; Tue, 21 Apr 2009 10:42:17 -0400 Received: from mail2.shareable.org ([80.68.89.115]:40868) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LwHAu-0004If-2B for qemu-devel@nongnu.org; Tue, 21 Apr 2009 10:42:16 -0400 Date: Tue, 21 Apr 2009 15:42:14 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] Fix utimensat (aka unbreak cp -a) Message-ID: <20090421144214.GC6375@shareable.org> References: <878wlufm8s.fsf@lechat.rtp-net.org> <20090421123455.GA15170@kos.to> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090421123455.GA15170@kos.to> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: laurent.desnogues@gmail.com, qemu-devel@nongnu.org, Arnaud Patard Riku Voipio wrote: > Soo.. glibc uses utimensat to implement futimens, but doesn't allow > applications to use utimensat in the same way. What a mess. It protects against apps passing in NULL path due to a bug and touching the directory by accident. A minor bit of protection indeed. > But if we are to go towards using libc calls, your patch is a step > backwards. In case pathname is null, we can use futimens. I agree, good idea. -- Jamie