diff options
author | Anthony Pesch <inolen@gmail.com> | 2013-08-09 23:03:42 -0700 |
---|---|---|
committer | Anthony Pesch <inolen@gmail.com> | 2013-08-09 23:03:42 -0700 |
commit | 35d58fd518da39db69adccd47882e2924961a861 (patch) | |
tree | 71c0b5ade6e6a32c88a09fd2cd2ba43c44cf21c4 /src/library_sockfs.js | |
parent | 0a39d6902565771e6a07a8b1e0229d257dfc0b7c (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.js | 18 |
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 |