[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    utimes() does not work?
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2009-11-29 17:27:45
Message-ID: 200911291932.35002.vda.linux () googlemail ! com
[Download RAW message or body]

Hi Bernhard,

I was working on a tar bug, and I see that on tar xf ...,
utimes() syscall does not work:

chown32("test3/file3", 0, 0)            = 0
chmod("test3/file3", 0100644)           = 0
utimes("test3/file3", {1259519208, 0})  = -1 EINVAL (Invalid argument)

when I reinstate old code which was using utime(), it works:

chown32("test3/file3", 0, 0)            = 0
chmod("test3/file3", 0100644)           = 0
utime("test3/file3", [2009/11/29-19:25:44, 2009/11/29-19:25:44]) = 0

I run 2.6.31-rc2 kernel.

Hmm, maybe it's because utimes should take two struct timeval's,
and your change gives only one? Manpage says:

int utimes(const char *filename, const struct timeval times[2]);


--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic