MCPcopy Create free account
hub / github.com/RsyncProject/rsync / do_lutimes

Function do_lutimes

syscall.c:1448–1468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1446
1447#ifdef HAVE_LUTIMES
1448int do_lutimes(const char *path, STRUCT_STAT *stp)
1449{
1450 struct timeval t[2];
1451
1452 if (dry_run) return 0;
1453 RETURN_ERROR_IF_RO_OR_LO;
1454
1455 t[0].tv_sec = stp->st_atime;
1456#ifdef ST_ATIME_NSEC
1457 t[0].tv_usec = stp->ST_ATIME_NSEC / 1000;
1458#else
1459 t[0].tv_usec = 0;
1460#endif
1461 t[1].tv_sec = stp->st_mtime;
1462#ifdef ST_MTIME_NSEC
1463 t[1].tv_usec = stp->ST_MTIME_NSEC / 1000;
1464#else
1465 t[1].tv_usec = 0;
1466#endif
1467 return lutimes(path, t);
1468}
1469#endif
1470
1471#ifdef HAVE_UTIMES

Callers 1

set_timesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected