Skip to content

Commit 0293236

Browse files
committed
Use new nodeos-mount API
1 parent 9ff4dd8 commit 0293236

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

server.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ function linuxCmdline(cmdline)
115115
*/
116116
function mkdirMountInfo(info, callback)
117117
{
118-
var dev = info.dev || info.type
119-
120-
utils.mkdirMount(dev, info.path, info.type, info.flags, info.extras, callback)
118+
utils.mkdirMount(info.path, info.type, info.flags, info.extras, callback)
121119
}
122120

123121
/**
@@ -162,7 +160,7 @@ function mountUserFilesystems(arr, upperdir, callback)
162160
if(single) return callback()
163161

164162
// Execute init
165-
utils.execInit(upperdir, [], function(error)
163+
utils.execInit(upperdir, function(error)
166164
{
167165
if(error) console.warn(error)
168166

@@ -185,9 +183,9 @@ function mountDevProcTmp_ExecInit(upperdir, isRoot, callback)
185183
var arr =
186184
[
187185
{
188-
dev: '/proc',
189186
path: upperdir+'/proc',
190-
flags: MS_BIND
187+
flags: MS_BIND,
188+
extras: {devFile: '/proc'}
191189
},
192190
{
193191
path: upperdir+'/tmp',
@@ -229,9 +227,9 @@ function mountDevProcTmp_ExecInit(upperdir, isRoot, callback)
229227

230228
// Regular user
231229
arr.unshift({
232-
dev: ROOT_HOME+'/dev',
233230
path: path,
234-
flags: MS_BIND
231+
flags: MS_BIND,
232+
extras: {devFile: ROOT_HOME+'/dev'}
235233
})
236234

237235
mountUserFilesystems(arr, upperdir, callback)
@@ -266,7 +264,7 @@ function overlay_user(usersFolder, user, callback)
266264

267265
if(user === 'root') upperdir = '/root'
268266

269-
utils.mkdirMount(type, upperdir, type, MS_NOSUID, extras, function(error)
267+
utils.mkdirMount(upperdir, type, MS_NOSUID, extras, function(error)
270268
{
271269
if(error) return callback(error)
272270

@@ -506,10 +504,9 @@ function mountUsersFS(cmdline)
506504

507505
// Mount users filesystem
508506
var type = process.env.rootfstype || cmdline.rootfstype || 'auto'
509-
var extras = {errors: 'remount-ro'}
507+
var extras = {errors: 'remount-ro', devFile: resolve(usersDev)}
510508

511-
utils.mkdirMount(resolve(usersDev), HOME, type, flags, extras,
512-
function(error)
509+
utils.mkdirMount(HOME, type, flags, extras, function(error)
513510
{
514511
if(error) return onerror(error)
515512

0 commit comments

Comments
 (0)