aboutsummaryrefslogtreecommitdiff
path: root/src/library_sockfs.js
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-08-09 23:03:42 -0700
committerAnthony Pesch <inolen@gmail.com>2013-08-09 23:03:42 -0700
commit35d58fd518da39db69adccd47882e2924961a861 (patch)
tree71c0b5ade6e6a32c88a09fd2cd2ba43c44cf21c4 /src/library_sockfs.js
parent0a39d6902565771e6a07a8b1e0229d257dfc0b7c (diff)
- merged FS and VFS namespaces
- split off fs, memfs, sockfs and tty libraries
Diffstat (limited to 'src/library_sockfs.js')
-rw-r--r--src/library_sockfs.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/library_sockfs.js b/src/library_sockfs.js
new file mode 100644
index 00000000..13118b71
--- /dev/null
+++ b/src/library_sockfs.js
@@ -0,0 +1,18 @@
+mergeInto(LibraryManager.library, {
+ $SOCKFS__postset: '__ATINIT__.push({ func: function() { SOCKFS.root = FS.mount(SOCKFS, {}, null); } });',
+ $SOCKFS__deps: ['$FS'],
+ $SOCKFS: {
+ mount: function(mount) {
+ var node = FS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 0777, 0);
+ node.node_ops = SOCKFS.node_ops;
+ node.stream_ops = SOCKFS.stream_ops;
+ return node;
+ },
+ node_ops: {
+ },
+ stream_ops: {
+ },
+ websocket_sock_ops: {
+ }
+ }
+}); \ No newline at end of file