[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix utimensat (aka unbreak cp -a)
From: |
Martin Mohring |
Subject: |
Re: [Qemu-devel] [PATCH] Fix utimensat (aka unbreak cp -a) |
Date: |
Tue, 21 Apr 2009 18:38:17 +0200 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
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)