Android-cuttlefish cvd tool
Namespaces | Functions | Variables
main.cpp File Reference
#include <fcntl.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <unistd.h>
#include <cerrno>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "absl/base/log_severity.h"
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/log/check.h"
#include "absl/log/globals.h"
#include "absl/log/initialize.h"
#include "absl/log/log.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "sandboxed_api/util/fileops.h"
#include "sandboxed_api/util/path.h"
#include "cuttlefish/host/commands/process_sandboxer/logs.h"
#include "cuttlefish/host/commands/process_sandboxer/pidfd.h"
#include "cuttlefish/host/commands/process_sandboxer/policies.h"
#include "cuttlefish/host/commands/process_sandboxer/sandbox_manager.h"
Include dependency graph for main.cpp:

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::process_sandboxer
 
namespace  cuttlefish::process_sandboxer::anonymous_namespace{main.cpp}
 

Functions

 ABSL_FLAG (std::string, assembly_dir, "", "cuttlefish/assembly build dir")
 
 ABSL_FLAG (std::string, host_artifacts_path, "", "Host exes and libs")
 
 ABSL_FLAG (std::string, environments_dir, "", "Cross-instance environment dir")
 
 ABSL_FLAG (std::string, guest_image_path, "", "Directory with `system.img`")
 
 ABSL_FLAG (std::string, sandboxer_log_dir, "", "Where to write log files")
 
 ABSL_FLAG (std::vector< std::string >, log_files, std::vector< std::string >(), "File paths outside the sandbox to write logs to")
 
 ABSL_FLAG (std::string, runtime_dir, "", "Working directory of host executables")
 
 ABSL_FLAG (bool, verbose_stderr, false, "Write debug messages to stderr")
 
std::optional< std::string_view > cuttlefish::process_sandboxer::anonymous_namespace{main.cpp}::FromEnv (const std::string &name)
 
absl::Status cuttlefish::process_sandboxer::anonymous_namespace{main.cpp}::ProcessSandboxerMain (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

constexpr char kCuttlefishConfigEnvVarName [] = "CUTTLEFISH_CONFIG_FILE"
 

Function Documentation

◆ ABSL_FLAG() [1/8]

ABSL_FLAG ( bool  ,
verbose_stderr  ,
false  ,
"Write debug messages to stderr"   
)

◆ ABSL_FLAG() [2/8]

ABSL_FLAG ( std::string  ,
assembly_dir  ,
""  ,
"cuttlefish/assembly build dir"   
)

◆ ABSL_FLAG() [3/8]

ABSL_FLAG ( std::string  ,
environments_dir  ,
""  ,
"Cross-instance environment dir"   
)

◆ ABSL_FLAG() [4/8]

ABSL_FLAG ( std::string  ,
guest_image_path  ,
""  ,
"Directory with `system.img`"   
)

◆ ABSL_FLAG() [5/8]

ABSL_FLAG ( std::string  ,
host_artifacts_path  ,
""  ,
"Host exes and libs"   
)

◆ ABSL_FLAG() [6/8]

ABSL_FLAG ( std::string  ,
runtime_dir  ,
""  ,
"Working directory of host executables"   
)

◆ ABSL_FLAG() [7/8]

ABSL_FLAG ( std::string  ,
sandboxer_log_dir  ,
""  ,
"Where to write log files"   
)

◆ ABSL_FLAG() [8/8]

ABSL_FLAG ( std::vector< std::string >  ,
log_files  ,
std::vector< std::string >  (),
"File paths outside the sandbox to write logs to"   
)

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ kCuttlefishConfigEnvVarName

constexpr char kCuttlefishConfigEnvVarName[] = "CUTTLEFISH_CONFIG_FILE"
inlineconstexpr