summaryrefslogtreecommitdiff
path: root/_obnammodule.c
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-12-29 13:44:11 +0000
committerLars Wirzenius <liw@liw.fi>2011-12-29 13:44:11 +0000
commit7b3e16049b4ef89dbc1f6e708f570afd12dc78af (patch)
tree982076a471a19a42205c1aefc9687287feeabe01 /_obnammodule.c
parent8f56599a4c927ba4b358a1ae50fa1657e2923dda (diff)
downloadobnam-7b3e16049b4ef89dbc1f6e708f570afd12dc78af.tar.gz
make LocalFS use utimensat instead of lutimes
Precision, precision, precision.
Diffstat (limited to '_obnammodule.c')
-rw-r--r--_obnammodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/_obnammodule.c b/_obnammodule.c
index 557ed414..d4c30605 100644
--- a/_obnammodule.c
+++ b/_obnammodule.c
@@ -70,7 +70,7 @@ fadvise_dontneed(PyObject *self, PyObject *args)
static PyObject *
-lutimes_wrapper(PyObject *self, PyObject *args)
+utimensat_wrapper(PyObject *self, PyObject *args)
{
int ret;
const char *filename;
@@ -84,7 +84,7 @@ lutimes_wrapper(PyObject *self, PyObject *args)
&tv[1].tv_usec))
return NULL;
- ret = lutimes(filename, tv);
+ ret = utimensat(AT_FDCWD, filename, tv, AT_SYMLINK_NOFOLLOW);
if (ret == -1)
ret = errno;
return Py_BuildValue("i", ret);
@@ -204,8 +204,8 @@ lsetxattr_wrapper(PyObject *self, PyObject *args)
static PyMethodDef methods[] = {
{"fadvise_dontneed", fadvise_dontneed, METH_VARARGS,
"Call posix_fadvise(2) with POSIX_FADV_DONTNEED argument."},
- {"lutimes", lutimes_wrapper, METH_VARARGS,
- "lutimes(2) wrapper; args are filename, atime, and mtime."},
+ {"utimensat", utimensat_wrapper, METH_VARARGS,
+ "utimensat(2) wrapper."},
{"lstat", lstat_wrapper, METH_VARARGS,
"lstat(2) wrapper; arg is filename, returns tuple."},
{"llistxattr", llistxattr_wrapper, METH_VARARGS,