From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwIzF-0008OG-OG for qemu-devel@nongnu.org; Tue, 21 Apr 2009 12:38:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwIzE-0008Mp-9A for qemu-devel@nongnu.org; Tue, 21 Apr 2009 12:38:20 -0400 Received: from [199.232.76.173] (port=41625 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwIzE-0008Mi-1o for qemu-devel@nongnu.org; Tue, 21 Apr 2009 12:38:20 -0400 Received: from dd21438.kasserver.com ([85.13.141.110]:39670) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwIzD-0003L7-K8 for qemu-devel@nongnu.org; Tue, 21 Apr 2009 12:38:19 -0400 Message-ID: <49EDF679.70605@opensuse.org> Date: Tue, 21 Apr 2009 18:38:17 +0200 From: Martin Mohring MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Fix utimensat (aka unbreak cp -a) References: <878wlufm8s.fsf@lechat.rtp-net.org> <20090421123455.GA15170@kos.to> <49EDEFD4.9000707@opensuse.org> In-Reply-To: <49EDEFD4.9000707@opensuse.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Martin Mohring Cc: laurent.desnogues@gmail.com, Riku Voipio , qemu-devel@nongnu.org, Arnaud Patard Martin Mohring wrote: > i found another related case it seems: > > when i call in a chroot under arm with qemu user mode: > > $ touch /var/log/wtmp > > the resulting file has a date/time of 1.1.1970, although the clock is > correct in the system. > > calling > > $ touch /var/log/wtmp /var/run/utmp /var/log/btmp > /bin/touch: setting times of `/var/run/utmp': Invalid argument > /bin/touch: setting times of `/var/log/btmp': Invalid argument > > results in the invalid argutment error. I ll currently check which > syscalls are involved here. > the time of 1.1.1970 looks to me like a wrongly passed argument (of ==0). > a trace of this: 27374 open("/var/log/wtmp",0x20941,0666) = 3 27374 dup2(3,0,3,0,0,1109324328) = 0 27374 close(3) = 0 27374 utimensat(0,"(null)",(nil),0) = 0 27374 close(0) = 0 27374 open("/var/run/utmp",0x20941,0666) = 0 27374 utimensat(0,"(null)",(nil),0) = -1 errno=22 (Invalid argument) 27374 close(0) = 0 27374 write(2,0x4007d430,12)/bin/touch: = 12 27374 write(2,0x4007d408,32)setting times of `/var/run/utmp' = 32 27374 write(2,0x4007cfd0,18): Invalid argument = 18 27374 write(2,0x4007d3d8,1) = 1 27374 open("/var/log/btmp",0x20941,0666) = 0 27374 utimensat(0,"(null)",(nil),0) = -1 errno=22 (Invalid argument) 27374 close(0) = 0 27374 write(2,0x4007d430,12)/bin/touch: = 12 27374 write(2,0x4007d408,32)setting times of `/var/log/btmp' = 32 27374 write(2,0x4007cfd0,18): Invalid argument = 18 27374 write(2,0x4007d3d8,1) = 1 27374 close(1) = 0 27374 close(2)