| 19 | namespace SC |
| 20 | { |
| 21 | static AwaitTask patchStatus(AwaitEventLoop& await, ThreadPool& threadPool, FileDescriptor& file, Span<char> readBuffer, |
| 22 | AwaitFileReadResult& readResult, AwaitFileWriteResult& writeResult) |
| 23 | { |
| 24 | const char patch[] = {'P', 'A', 'I', 'D'}; |
| 25 | |
| 26 | AwaitFileWriteOptions writeOptions; |
| 27 | writeOptions.threadPool = &threadPool; |
| 28 | writeOptions.useOffset = true; |
| 29 | writeOptions.offset = 7; |
| 30 | SC_CO_TRY(co_await await.fileWrite(file, {patch, sizeof(patch)}, &writeResult, writeOptions)); |
| 31 | |
| 32 | AwaitFileReadOptions readOptions; |
| 33 | readOptions.threadPool = &threadPool; |
| 34 | readOptions.useOffset = true; |
| 35 | readOptions.offset = 0; |
| 36 | SC_CO_TRY(co_await await.fileRead(file, readBuffer, readResult, readOptions)); |
| 37 | |
| 38 | co_return Result(true); |
| 39 | } |
| 40 | |
| 41 | static Result runAwaitFilePatch() |
| 42 | { |
no test coverage detected