    if (pos == std::string::npos) return "";
    return path.substr(0, pos);
  }
  
  struct tm get_time() {
    time_t rawtime;
    time(&rawtime);
  
 
</s>
std::string check_output(const std::string& command) {
  char buffer[128];
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);

  if (!pipe) {
    return "";
  }

  while (fgets(buffer, std::size(buffer), pipe.get()) != nullptr) {
    result += std::string(buffer);
  }

  return result;
}

    if (pos == std::string::npos) return "";
    return path.substr(0, pos);
  }
  
std::string check_output(const std::string& command) {
  char buffer[128];
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"), pclose);

  if (!pipe) {
    return "";
  }

  while (fgets(buffer, std::size(buffer), pipe.get()) != nullptr) {
    result += std::string(buffer);
  }

  return result;
}

  struct tm get_time() {
    time_t rawtime;
    time(&rawtime);
  
keep keep keep add keep keep keep keep
 Put journal and nvme stats in bootlog (#22849)

* Run commands and put output in bootlog

* log nvme

* fix indent

* cereal without event

* use regular array
selfdrive/common/util.cc