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

Function get_device_size

flist.c:1550–1562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1548}
1549
1550OFF_T get_device_size(int fd, const char *fname)
1551{
1552 OFF_T off = lseek(fd, 0, SEEK_END);
1553
1554 if (off == (OFF_T) -1) {
1555 rsyserr(FERROR, errno, "failed to get device size via seek: %s", fname);
1556 return 0;
1557 }
1558 if (lseek(fd, 0, SEEK_SET) != 0)
1559 rsyserr(FERROR, errno, "failed to seek device back to start: %s", fname);
1560
1561 return off;
1562}
1563
1564/* Only called for temporary file_struct entries created by make_file(). */
1565void unmake_file(struct file_struct *file)

Callers 4

send_filesFunction · 0.85
make_fileFunction · 0.85
recv_generatorFunction · 0.85
recv_filesFunction · 0.85

Calls 1

rsyserrFunction · 0.70

Tested by

no test coverage detected