Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/utime.c
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 360 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 360 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | /* |
2 | * utime.c | ||
3 | */ | ||
4 | |||
5 | #include <utime.h> | ||
6 | #include <sys/time.h> | ||
7 | #include <sys/types.h> | ||
8 | #include <sys/syscall.h> | ||
9 | |||
10 | #ifndef __NR_utime | ||
11 | |||
12 | int utime(const char *filename, const struct utimbuf *buf) | ||
13 | { | ||
14 | struct timeval tvp[2]; | ||
15 | |||
16 | tvp[0].tv_sec = buf->actime; | ||
17 | tvp[0].tv_usec = 0; | ||
18 | tvp[1].tv_sec = buf->modtime; | ||
19 | tvp[1].tv_usec = 0; | ||
20 | |||
21 | return utimes(filename, tvp); | ||
22 | } | ||
23 | |||
24 | #endif |