mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
@@ -259,7 +259,7 @@ int mkdir_p_root_full(const char *root, const char *p, uid_t uid, gid_t gid, mod
|
||||
struct timespec tspec;
|
||||
timespec_store(&tspec, ts);
|
||||
|
||||
if (futimens(dfd, (const struct timespec[2]) { { .tv_nsec = UTIME_OMIT }, tspec }) < 0)
|
||||
if (futimens(dfd, (const struct timespec[2]) { TIMESPEC_OMIT, tspec }) < 0)
|
||||
return -errno;
|
||||
|
||||
if (futimens(nfd, (const struct timespec[2]) { tspec, tspec }) < 0)
|
||||
|
||||
@@ -75,6 +75,8 @@ typedef enum TimestampStyle {
|
||||
#define DUAL_TIMESTAMP_INFINITY ((dual_timestamp) { USEC_INFINITY, USEC_INFINITY })
|
||||
#define TRIPLE_TIMESTAMP_NULL ((triple_timestamp) {})
|
||||
|
||||
#define TIMESPEC_OMIT ((const struct timespec) { .tv_nsec = UTIME_OMIT })
|
||||
|
||||
usec_t now(clockid_t clock);
|
||||
nsec_t now_nsec(clockid_t clock);
|
||||
|
||||
|
||||
@@ -4936,7 +4936,7 @@ static int do_copy_files(Context *context, Partition *p, const char *root) {
|
||||
struct timespec tspec;
|
||||
timespec_store(&tspec, ts);
|
||||
|
||||
if (futimens(pfd, (const struct timespec[2]) { { .tv_nsec = UTIME_OMIT }, tspec }) < 0)
|
||||
if (futimens(pfd, (const struct timespec[2]) { TIMESPEC_OMIT, tspec }) < 0)
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user