Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/tool/pps/pps.cc
7141 views
1
/*
2
* Copyright © 2020 Collabora, Ltd.
3
* Author: Antonio Caggiano <[email protected]>
4
*
5
* SPDX-License-Identifier: MIT
6
*/
7
8
#include "pps.h"
9
10
#include <cerrno>
11
#include <cstring>
12
13
namespace pps
14
{
15
bool check(int res, const char *msg)
16
{
17
if (res < 0) {
18
char *err_msg = std::strerror(errno);
19
PERFETTO_ELOG("%s: %s", msg, err_msg);
20
return false;
21
}
22
23
return true;
24
}
25
26
} // namespace pps
27
28