Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: platform.cc

Issue 3475009: Adds the necessary changes to tpm_init to allow triggered initialization. (Closed) Base URL: http://git.chromium.org/git/tpm_init.git
Patch Set: Address feedback. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platform.h ('k') | tpm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform.cc
diff --git a/platform.cc b/platform.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b07590f2baa15d631377c900efcfaaeda8c70a0a
--- /dev/null
+++ b/platform.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Contains the implementation of class Platform
+
+#include "platform.h"
+
+#include <errno.h>
+#include <sys/mount.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+namespace tpm_init {
+
+const int kDefaultUmask = S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH
+ | S_IXOTH;
+
+Platform::Platform()
+ : umask_(kDefaultUmask) {
+}
+
+Platform::~Platform() {
+}
+
+int Platform::SetMask(int new_mask) {
+ return umask(new_mask);
+}
+
+} // namespace tpm_init
« no previous file with comments | « platform.h ('k') | tpm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698