Use newer gflags namespace for command-line flags

PiperOrigin-RevId: 251639941
Change-Id: I3037ce9510a3bc62cf5c899c64f2e7d344a8b4ee
This commit is contained in:
Christian Blichmann 2019-06-05 07:39:11 -07:00 committed by Copybara-Service
parent 1b2b83676b
commit 9b78e331fa
9 changed files with 13 additions and 13 deletions

View File

@ -418,9 +418,9 @@ void ServeRequest(sandbox2::Comms* comms) {
} // namespace sapi } // namespace sapi
extern "C" ABSL_ATTRIBUTE_WEAK int main(int argc, char** argv) { extern "C" ABSL_ATTRIBUTE_WEAK int main(int argc, char** argv) {
google::SetCommandLineOptionWithMode("userspace_coredumper", "false", gflags::SetCommandLineOptionWithMode("userspace_coredumper", "false",
google::SET_FLAG_IF_DEFAULT); gflags::SET_FLAG_IF_DEFAULT);
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
// Note regarding the FD usage here: Parent and child seem to make use of the // Note regarding the FD usage here: Parent and child seem to make use of the

View File

@ -35,7 +35,7 @@
#define Z_STREAM_END 1 #define Z_STREAM_END 1
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
sapi::Sandbox sandbox(sapi::zlib::zlib_sapi_embed_create()); sapi::Sandbox sandbox(sapi::zlib::zlib_sapi_embed_create());

View File

@ -46,7 +46,7 @@ static uint32_t ComputeCRC4Impl(const uint8_t* ptr, uint64_t len) {
} }
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, false); gflags::ParseCommandLineFlags(&argc, &argv, false);
// Set-up the sandbox2::Client object, using a file descriptor (1023). // Set-up the sandbox2::Client object, using a file descriptor (1023).
sandbox2::Comms comms(sandbox2::Comms::kSandbox2ClientCommsFD); sandbox2::Comms comms(sandbox2::Comms::kSandbox2ClientCommsFD);

View File

@ -82,7 +82,7 @@ bool SandboxedCRC4(sandbox2::Comms* comms, uint32_t* crc4) {
} // namespace } // namespace
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
if (absl::GetFlag(FLAGS_input).empty()) { if (absl::GetFlag(FLAGS_input).empty()) {

View File

@ -39,9 +39,9 @@ static int SandboxeeFunction(sandbox2::Comms* comms) {
int main(int argc, char** argv) { int main(int argc, char** argv) {
// Writing to stderr limits the number of invoked syscalls. // Writing to stderr limits the number of invoked syscalls.
google::SetCommandLineOptionWithMode("logtostderr", "true", gflags::SetCommandLineOptionWithMode("logtostderr", "true",
google::SET_FLAG_IF_DEFAULT); gflags::SET_FLAG_IF_DEFAULT);
google::ParseCommandLineFlags(&argc, &argv, false); gflags::ParseCommandLineFlags(&argc, &argv, false);
// Instantiate Comms channel with the parent Executor // Instantiate Comms channel with the parent Executor
sandbox2::Comms comms(sandbox2::Comms::kSandbox2ClientCommsFD); sandbox2::Comms comms(sandbox2::Comms::kSandbox2ClientCommsFD);

View File

@ -107,7 +107,7 @@ static int SandboxIteration(sandbox2::ForkClient* fork_client, int32_t i) {
} }
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
// Start a custom fork-server (via sandbox2::Executor). // Start a custom fork-server (via sandbox2::Executor).

View File

@ -98,7 +98,7 @@ std::unique_ptr<sandbox2::Policy> GetPolicy() {
} }
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
const std::string path = sandbox2::GetInternalDataDependencyFilePath( const std::string path = sandbox2::GetInternalDataDependencyFilePath(

View File

@ -96,7 +96,7 @@ void OutputFD(int fd) {
} // namespace } // namespace
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
if (argc < 2) { if (argc < 2) {

View File

@ -64,7 +64,7 @@ std::unique_ptr<sandbox2::Policy> GetPolicy() {
} // namespace } // namespace
int main(int argc, char** argv) { int main(int argc, char** argv) {
google::ParseCommandLineFlags(&argc, &argv, true); gflags::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]); google::InitGoogleLogging(argv[0]);
if (absl::GetFlag(FLAGS_input).empty()) { if (absl::GetFlag(FLAGS_input).empty()) {