| 617 | struct ReadVersion { |
| 618 | std::string content; |
| 619 | ReadVersion() { |
| 620 | std::ostringstream oss; |
| 621 | if (butil::read_command_output(oss, "uname -ap") != 0) { |
| 622 | LOG(ERROR) << "Fail to read kernel version"; |
| 623 | return; |
| 624 | } |
| 625 | content.append(oss.str()); |
| 626 | } |
| 627 | }; |
| 628 | static void get_kernel_version(std::ostream& os, void*) { |
| 629 | os << butil::get_leaky_singleton<ReadVersion>()->content; |
nothing calls this directly
no test coverage detected