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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/node.cc

Issue 59883020: [NaCl SDK] nacl_io: Enable isatty running under sel_ldr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "nacl_io/node.h" 5 #include "nacl_io/node.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <poll.h> 10 #include <poll.h>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 stat_.st_mode &= ~S_IFMT; 177 stat_.st_mode &= ~S_IFMT;
178 stat_.st_mode |= type; 178 stat_.st_mode |= type;
179 } 179 }
180 180
181 bool Node::IsaDir() { return (stat_.st_mode & S_IFDIR) != 0; } 181 bool Node::IsaDir() { return (stat_.st_mode & S_IFDIR) != 0; }
182 182
183 bool Node::IsaFile() { return (stat_.st_mode & S_IFREG) != 0; } 183 bool Node::IsaFile() { return (stat_.st_mode & S_IFREG) != 0; }
184 184
185 bool Node::IsaSock() { return (stat_.st_mode & S_IFSOCK) != 0; } 185 bool Node::IsaSock() { return (stat_.st_mode & S_IFSOCK) != 0; }
186 186
187 bool Node::IsaTTY() { return (stat_.st_mode & S_IFCHR) != 0; } 187 Error Node::Isatty() {
188 return ENOTTY;
189 }
188 190
189 Error Node::AddChild(const std::string& name, const ScopedNode& node) { 191 Error Node::AddChild(const std::string& name, const ScopedNode& node) {
190 return ENOTDIR; 192 return ENOTDIR;
191 } 193 }
192 194
193 Error Node::RemoveChild(const std::string& name) { return ENOTDIR; } 195 Error Node::RemoveChild(const std::string& name) { return ENOTDIR; }
194 196
195 Error Node::FindChild(const std::string& name, ScopedNode* out_node) { 197 Error Node::FindChild(const std::string& name, ScopedNode* out_node) {
196 out_node->reset(NULL); 198 out_node->reset(NULL);
197 return ENOTDIR; 199 return ENOTDIR;
198 } 200 }
199 201
200 int Node::ChildCount() { return 0; } 202 int Node::ChildCount() { return 0; }
201 203
202 void Node::Link() { stat_.st_nlink++; } 204 void Node::Link() { stat_.st_nlink++; }
203 205
204 void Node::Unlink() { stat_.st_nlink--; } 206 void Node::Unlink() { stat_.st_nlink--; }
205 207
206 } // namespace nacl_io 208 } // namespace nacl_io
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698