bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: touch


From: Jim Meyering
Subject: Re: touch
Date: Tue, 22 Dec 2009 11:21:27 +0100

Eric Blake wrote:
> Yep - it is indeed an example of the mtime (and ctime) failing to update,
> even though utimensat claimed success.

Here's an interesting glibc change from just a few hours ago:

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4286fa41edc33da4cfbc56c2c5902920a52e3184


>From 4286fa41edc33da4cfbc56c2c5902920a52e3184 Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <address@hidden>
Date: Mon, 21 Dec 2009 14:08:05 -0800
Subject: [PATCH] Handle AT_FDCWD in futimens.

---
 ChangeLog                          |    4 ++++
 sysdeps/unix/sysv/linux/futimens.c |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 35d0a57..02cae68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-21  Ulrich Drepper  <address@hidden>
+
+       * sysdeps/unix/sysv/linux/futimens.c: Handle AT_FDCWD.
+
 2009-12-15  Ulrich Drepper  <address@hidden>

        [BZ #11093]
diff --git a/sysdeps/unix/sysv/linux/futimens.c 
b/sysdeps/unix/sysv/linux/futimens.c
index 67f2588..fe8e920 100644
--- a/sysdeps/unix/sysv/linux/futimens.c
+++ b/sysdeps/unix/sysv/linux/futimens.c
@@ -33,6 +33,11 @@ int
 futimens (int fd, const struct timespec tsp[2])
 {
 #ifdef __NR_utimensat
+  if (fd < 0)
+    {
+      __set_errno (EBADF);
+      return -1;
+    }
   return INLINE_SYSCALL (utimensat, 4, fd, NULL, tsp, 0);
 #else
   __set_errno (ENOSYS);
--
1.6.6.rc3.271.g3d40f




reply via email to

[Prev in Thread] Current Thread [Next in Thread]