| 85 | } |
| 86 | |
| 87 | static Bytes createDirent(const std::string& filename, |
| 88 | int extent, |
| 89 | int records, |
| 90 | const std::initializer_list<int> blocks, |
| 91 | int user = 0) |
| 92 | { |
| 93 | Bytes dirent; |
| 94 | ByteWriter bw(dirent); |
| 95 | bw.write_8(user); |
| 96 | bw.append(filename); |
| 97 | while (bw.pos != 12) |
| 98 | bw.write_8(' '); |
| 99 | |
| 100 | bw.write_8(extent & 0x1f); |
| 101 | bw.write_8(0); |
| 102 | bw.write_8(extent >> 5); |
| 103 | bw.write_8(records); |
| 104 | |
| 105 | for (int block : blocks) |
| 106 | bw.write_8(block); |
| 107 | while (bw.pos != 32) |
| 108 | bw.write_8(0); |
| 109 | |
| 110 | return dirent; |
| 111 | } |
| 112 | |
| 113 | static void setBlock( |
| 114 | const std::shared_ptr<SectorInterface>& sectors, int block, Bytes data) |
no outgoing calls
no test coverage detected