summaryrefslogtreecommitdiff
path: root/udev/udev-node.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-03-10 14:43:07 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-03-10 14:43:07 +0100
commit455f792e4791e037eb0406005b92c345cf0baf56 (patch)
treed77a70fe5f4e7fa0f84ceb048dfa08d13c30146b /udev/udev-node.c
parenta245a97b4e805c65ce22659742371550ccf002c1 (diff)
replace utimes() with utimensat()
Diffstat (limited to 'udev/udev-node.c')
-rw-r--r--udev/udev-node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udev/udev-node.c b/udev/udev-node.c
index a70c147d3e..307a76b271 100644
--- a/udev/udev-node.c
+++ b/udev/udev-node.c
@@ -57,7 +57,7 @@ int udev_node_mknod(struct udev_device *dev, const char *file, dev_t devnum, mod
preserve = 1;
udev_selinux_lsetfilecon(udev, file, mode);
/* update time stamp when we re-use the node, like on media change events */
- utimes(file, NULL);
+ utimensat(AT_FDCWD, file, NULL, 0);
} else {
char file_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)];
@@ -178,7 +178,7 @@ static int node_symlink(struct udev *udev, const char *node, const char *slink)
info(udev, "preserve already existing symlink '%s' to '%s'\n",
slink, target);
udev_selinux_lsetfilecon(udev, slink, S_IFLNK);
- lutimes(slink, NULL);
+ utimensat(AT_FDCWD, slink, NULL, AT_SYMLINK_NOFOLLOW);
goto exit;
}
}