1
0
mirror of https://github.com/Zygo/bees.git synced 2025-06-16 09:36:17 +02:00

crucible: fd: remove dead reference to unlink_or_die, introduce ftruncate_or_die

This commit is contained in:
Zygo Blaxell
2016-12-02 00:02:36 -05:00
parent dd21e6f848
commit ea0910ee6c
2 changed files with 10 additions and 1 deletions

View File

@ -230,6 +230,14 @@ namespace crucible {
}
}
void
ftruncate_or_die(int fd, off_t size)
{
if (::ftruncate(fd, size)) {
THROW_ERRNO("ftruncate: " << name_fd(fd) << " size " << size);
}
}
string
socket_domain_ntoa(int domain)
{