1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-05-08 04:59:37 +02:00

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

Dieser Commit ist enthalten in:
Zygo Blaxell
2016-12-02 00:02:36 -05:00
Ursprung dd21e6f848
Commit ea0910ee6c
2 geänderte Dateien mit 10 neuen und 1 gelöschten Zeilen
+2 -1
Datei anzeigen
@@ -70,10 +70,11 @@ namespace crucible {
string mmap_flags_ntoa(int flags);
// Unlink, rename
void unlink_or_die(const string &file);
void rename_or_die(const string &from, const string &to);
void renameat_or_die(int fromfd, const string &frompath, int tofd, const string &topath);
void ftruncate_or_die(int fd, off_t size);
// Read or write structs:
// There is a template specialization to read or write strings
// Three-arg version of read_or_die/write_or_die throws an error on incomplete read/writes
+8
Datei anzeigen
@@ -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)
{