| 91 | } |
| 92 | |
| 93 | std::string GetSharedFramebufferName(const std::string& vm_id) { |
| 94 | // macOS shm_open has PSHMNAMLEN=31 (30 usable chars after leading '/'). |
| 95 | // The caller appends "_<generation>" (up to 4 chars), so the base name |
| 96 | // must be at most 26 chars: "/" (1) + "tb_" (3) + 22 hex = 26. |
| 97 | std::string compact; |
| 98 | compact.reserve(32); |
| 99 | for (char c : vm_id) { |
| 100 | if (c != '-') compact += c; |
| 101 | } |
| 102 | return "/tb_" + compact.substr(0, 22); |
| 103 | } |
| 104 | |
| 105 | } // namespace ipc |
no outgoing calls
no test coverage detected