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

Unified Diff: native_client_sdk/src/libraries/nacl_io/node.cc

Issue 303223007: [NaCl SDK] nacl_io: Run clang-format over nacl_io sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: native_client_sdk/src/libraries/nacl_io/node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/node.cc b/native_client_sdk/src/libraries/nacl_io/node.cc
index fc30867bc9fcd459b15c348e4c279e235246e375..2024e9753b18f05619c02bf52dd08e58f033c85e 100644
--- a/native_client_sdk/src/libraries/nacl_io/node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/node.cc
@@ -39,9 +39,12 @@ Node::Node(Filesystem* filesystem) : filesystem_(filesystem) {
stat_.st_ino = 1;
}
-Node::~Node() {}
+Node::~Node() {
+}
-Error Node::Init(int open_flags) { return 0; }
+Error Node::Init(int open_flags) {
+ return 0;
+}
void Node::Destroy() {
if (filesystem_) {
@@ -49,7 +52,9 @@ void Node::Destroy() {
}
}
-EventEmitter* Node::GetEventEmitter() { return NULL; }
+EventEmitter* Node::GetEventEmitter() {
+ return NULL;
+}
uint32_t Node::GetEventStatus() {
if (GetEventEmitter())
@@ -71,9 +76,13 @@ bool Node::CanOpen(int open_flags) {
return false;
}
-Error Node::FSync() { return 0; }
+Error Node::FSync() {
+ return 0;
+}
-Error Node::FTruncate(off_t length) { return EINVAL; }
+Error Node::FTruncate(off_t length) {
+ return EINVAL;
+}
Error Node::GetDents(size_t offs,
struct dirent* pdir,
@@ -97,7 +106,9 @@ Error Node::Ioctl(int request, ...) {
return rtn;
}
-Error Node::VIoctl(int request, va_list args) { return EINVAL; }
+Error Node::VIoctl(int request, va_list args) {
+ return EINVAL;
+}
Error Node::Read(const HandleAttr& attr,
void* buf,
@@ -153,24 +164,34 @@ Error Node::MMap(void* addr,
return 0;
}
-Error Node::Tcflush(int queue_selector) { return EINVAL; }
+Error Node::Tcflush(int queue_selector) {
+ return EINVAL;
+}
-Error Node::Tcgetattr(struct termios* termios_p) { return EINVAL; }
+Error Node::Tcgetattr(struct termios* termios_p) {
+ return EINVAL;
+}
Error Node::Tcsetattr(int optional_actions, const struct termios* termios_p) {
return EINVAL;
}
-int Node::GetLinks() { return stat_.st_nlink; }
+int Node::GetLinks() {
+ return stat_.st_nlink;
+}
-int Node::GetMode() { return stat_.st_mode & ~S_IFMT; }
+int Node::GetMode() {
+ return stat_.st_mode & ~S_IFMT;
+}
Error Node::GetSize(off_t* out_size) {
*out_size = stat_.st_size;
return 0;
}
-int Node::GetType() { return stat_.st_mode & S_IFMT; }
+int Node::GetType() {
+ return stat_.st_mode & S_IFMT;
+}
void Node::SetType(int type) {
assert((type & ~S_IFMT) == 0);
@@ -178,11 +199,17 @@ void Node::SetType(int type) {
stat_.st_mode |= type;
}
-bool Node::IsaDir() { return (stat_.st_mode & S_IFDIR) != 0; }
+bool Node::IsaDir() {
+ return (stat_.st_mode & S_IFDIR) != 0;
+}
-bool Node::IsaFile() { return (stat_.st_mode & S_IFREG) != 0; }
+bool Node::IsaFile() {
+ return (stat_.st_mode & S_IFREG) != 0;
+}
-bool Node::IsaSock() { return (stat_.st_mode & S_IFSOCK) != 0; }
+bool Node::IsaSock() {
+ return (stat_.st_mode & S_IFSOCK) != 0;
+}
Error Node::Isatty() {
return ENOTTY;
@@ -192,17 +219,25 @@ Error Node::AddChild(const std::string& name, const ScopedNode& node) {
return ENOTDIR;
}
-Error Node::RemoveChild(const std::string& name) { return ENOTDIR; }
+Error Node::RemoveChild(const std::string& name) {
+ return ENOTDIR;
+}
Error Node::FindChild(const std::string& name, ScopedNode* out_node) {
out_node->reset(NULL);
return ENOTDIR;
}
-int Node::ChildCount() { return 0; }
+int Node::ChildCount() {
+ return 0;
+}
-void Node::Link() { stat_.st_nlink++; }
+void Node::Link() {
+ stat_.st_nlink++;
+}
-void Node::Unlink() { stat_.st_nlink--; }
+void Node::Unlink() {
+ stat_.st_nlink--;
+}
} // namespace nacl_io
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/nacl_io.cc ('k') | native_client_sdk/src/libraries/nacl_io/ostermios.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698