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

Unified Diff: libraries/nacl-mounts/memory/MemNode.cc

Issue 10556007: changes in memory mount and socket subsystem to port thttpd (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 6 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 | « libraries/nacl-mounts/base/KernelProxy.cc ('k') | libraries/nacl-mounts/net/SocketSubSystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libraries/nacl-mounts/memory/MemNode.cc
===================================================================
--- libraries/nacl-mounts/memory/MemNode.cc (revision 598)
+++ libraries/nacl-mounts/memory/MemNode.cc (working copy)
@@ -7,6 +7,7 @@
#include "MemNode.h"
#include <assert.h>
#include <errno.h>
+#include <nacl-mounts/util/DebugPrint.h>
Evgeniy Stepanov 2012/06/15 12:31:47 unused?
vissi 2012/06/15 13:03:20 Yep, rm'd.
#include <stdio.h>
#include <stdlib.h>
@@ -22,12 +23,14 @@
}
int MemNode::stat(struct stat *buf) {
+ if (!buf) return 0;
Evgeniy Stepanov 2012/06/15 12:31:47 why do you need this check?
vissi 2012/06/15 13:03:20 You are right, it's done in the caller.
memset(buf, 0, sizeof(struct stat));
buf->st_ino = (ino_t)slot_;
if (is_dir()) {
buf->st_mode = S_IFDIR | 0777;
} else {
- buf->st_mode = S_IFREG | 0777;
+ buf->st_mode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+ | S_IWOTH;
vissi 2012/06/15 12:09:13 The reason for this is that thttpd treats files as
buf->st_size = len_;
}
buf->st_uid = 1001;
« no previous file with comments | « libraries/nacl-mounts/base/KernelProxy.cc ('k') | libraries/nacl-mounts/net/SocketSubSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698