Show a warning when tmpfs size is not specified

PiperOrigin-RevId: 302441519
Change-Id: Ia4130c9067f00ed48065ea3b4854c844e7b88f85
This commit is contained in:
Kevin Hamacher 2020-03-23 08:44:01 -07:00 committed by Copybara-Service
parent 8e83506380
commit dadf55f647

View File

@ -432,8 +432,14 @@ class PolicyBuilder final {
// directories inside the namespace if needed. // directories inside the namespace if needed.
// //
// Calling this function will enable use of namespaces. // Calling this function will enable use of namespaces.
PolicyBuilder& AddTmpfs(absl::string_view inside, ABSL_DEPRECATED(
size_t sz = 4 << 20 /* 4MiB */); "Explicitly specify tmpfs size by using AddTmpfs(inside, sz) instead")
PolicyBuilder& AddTmpfs(absl::string_view inside) {
LOG(WARNING) << "Tmpfs size not specified, defaulting to 4 MiB";
return AddTmpfs(inside, 4 << 20 /* 4 MiB */);
}
PolicyBuilder& AddTmpfs(absl::string_view inside, size_t sz);
// Allows unrestricted access to the network by *not* creating a network // Allows unrestricted access to the network by *not* creating a network
// namespace. Note that this only disables the network namespace. To actually // namespace. Note that this only disables the network namespace. To actually