svn commit: trunk/uClibc/libc/sysdeps/linux/common
vapier at uclibc.org
vapier at uclibc.org
Sat Jan 27 08:17:39 UTC 2007
Author: vapier
Date: 2007-01-27 00:17:38 -0800 (Sat, 27 Jan 2007)
New Revision: 17548
Log:
fix from blackfin repo: Jie Zhang writes: Passing NULL as the second argument to utimes () if the second argument to utime () is NULL as the kernel will take care of getting/setting current time
Modified:
trunk/uClibc/libc/sysdeps/linux/common/utime.c
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/utime.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/utime.c 2007-01-27 06:02:10 UTC (rev 17547)
+++ trunk/uClibc/libc/sysdeps/linux/common/utime.c 2007-01-27 08:17:38 UTC (rev 17548)
@@ -30,13 +30,8 @@
timevals[1].tv_usec = 0L;
timevals[0].tv_sec = (long int) times->actime;
timevals[1].tv_sec = (long int) times->modtime;
- } else {
- if (gettimeofday(&timevals[0], NULL) < 0) {
- return -1;
- }
- timevals[1] = timevals[0];
}
- return utimes(file, timevals);
+ return utimes(file, times ? timevals : NULL);
}
#endif
libc_hidden_def(utime)
More information about the uClibc-cvs
mailing list