diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-02-20 17:49:44 +0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-02-20 17:49:44 +0700 |
commit | 686d2e6a68f02da35a4fc4d71c5d152c7ed2d177 (patch) | |
tree | e78934a441bff4e958a899b0acbb9fe17abef436 | |
parent | 457013a00ae864758969d14eff1f539de2ac8022 (diff) |
strict fix: Can't use octal constants.
-rw-r--r-- | src/library_fs.js | 8 | ||||
-rw-r--r-- | src/library_memfs.js | 4 | ||||
-rw-r--r-- | src/library_sockfs.js | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/library_fs.js b/src/library_fs.js index e97ba588..1428f041 100644 --- a/src/library_fs.js +++ b/src/library_fs.js @@ -616,13 +616,13 @@ mergeInto(LibraryManager.library, { }, // helpers to create specific types of nodes create: function(path, mode) { - mode = mode !== undefined ? mode : 0666; + mode = mode !== undefined ? mode : 438 /* 0666 */; mode &= {{{ cDefine('S_IALLUGO') }}}; mode |= {{{ cDefine('S_IFREG') }}}; return FS.mknod(path, mode, 0); }, mkdir: function(path, mode) { - mode = mode !== undefined ? mode : 0777; + mode = mode !== undefined ? mode : 511 /* 0777 */; mode &= {{{ cDefine('S_IRWXUGO') }}} | {{{ cDefine('S_ISVTX') }}}; mode |= {{{ cDefine('S_IFDIR') }}}; return FS.mknod(path, mode, 0); @@ -630,7 +630,7 @@ mergeInto(LibraryManager.library, { mkdev: function(path, mode, dev) { if (typeof(dev) === 'undefined') { dev = mode; - mode = 0666; + mode = 438 /* 0666 */; } mode |= {{{ cDefine('S_IFCHR') }}}; return FS.mknod(path, mode, dev); @@ -895,7 +895,7 @@ mergeInto(LibraryManager.library, { }, open: function(path, flags, mode, fd_start, fd_end) { flags = typeof flags === 'string' ? FS.modeStringToFlags(flags) : flags; - mode = typeof mode === 'undefined' ? 0666 : mode; + mode = typeof mode === 'undefined' ? 438 /* 0666 */ : mode; if ((flags & {{{ cDefine('O_CREAT') }}})) { mode = (mode & {{{ cDefine('S_IALLUGO') }}}) | {{{ cDefine('S_IFREG') }}}; } else { diff --git a/src/library_memfs.js b/src/library_memfs.js index cf98ecff..95c3ae65 100644 --- a/src/library_memfs.js +++ b/src/library_memfs.js @@ -8,7 +8,7 @@ mergeInto(LibraryManager.library, { CONTENT_FLEXIBLE: 2, // has been modified or never set to anything, and is a flexible js array that can grow/shrink CONTENT_FIXED: 3, // contains some fixed-size content written into it, in a typed array mount: function(mount) { - return MEMFS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 0777, 0); + return MEMFS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 511 /* 0777 */, 0); }, createNode: function(parent, name, mode, dev) { if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { @@ -184,7 +184,7 @@ mergeInto(LibraryManager.library, { return entries; }, symlink: function(parent, newname, oldpath) { - var node = MEMFS.createNode(parent, newname, 0777 | {{{ cDefine('S_IFLNK') }}}, 0); + var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | {{{ cDefine('S_IFLNK') }}}, 0); node.link = oldpath; return node; }, diff --git a/src/library_sockfs.js b/src/library_sockfs.js index 2028d841..22fd8761 100644 --- a/src/library_sockfs.js +++ b/src/library_sockfs.js @@ -3,7 +3,7 @@ mergeInto(LibraryManager.library, { $SOCKFS__deps: ['$FS', 'mkport'], $SOCKFS: { mount: function(mount) { - return FS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 0777, 0); + return FS.createNode(null, '/', {{{ cDefine('S_IFDIR') }}} | 511 /* 0777 */, 0); }, createSocket: function(family, type, protocol) { var streaming = type == {{{ cDefine('SOCK_STREAM') }}}; |