| 96 | static constexpr uint64_t TERNFS_PAGE_SIZE = 4096; |
| 97 | |
| 98 | static bool validName(const BincodeBytesRef& name) { |
| 99 | if (name.size() == 0) { |
| 100 | return false; |
| 101 | } |
| 102 | if (name == BincodeBytesRef(".") || name == BincodeBytesRef("..")) { |
| 103 | return false; |
| 104 | } |
| 105 | for (int i = 0; i < name.size(); i++) { |
| 106 | if (name.data()[i] == (uint8_t)'/' || name.data()[i] == 0) { |
| 107 | return false; |
| 108 | } |
| 109 | } |
| 110 | return true; |
| 111 | } |
| 112 | |
| 113 | static int pickMtu(uint16_t mtu) { |
| 114 | if (mtu == 0) { mtu = DEFAULT_UDP_MTU; } |
no test coverage detected