Skip to content

Commit 15df874

Browse files
author
luii
committed
Change documentation of linuxCmdline
1 parent fb4c783 commit 15df874

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

server.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var ROOT_HOME = ''
2929
var single
3030

3131
/**
32-
* This callback is part of the mountDevProcTmp_ExecInit function
32+
* This callback is part of the `mountDevProcTmp_ExecInit` function
3333
* @callback mountDevProcCallback
3434
* @param {Error} error The callback is called with a error if the devices
3535
* couldnt be mounted
@@ -53,17 +53,22 @@ function onerror(error)
5353
/**
5454
* This functions takes the cmdline **showed below in the example** and splits
5555
* it into key value pairs
56-
* @access private
57-
* @param {String} cmdline This string contains information about the
58-
* initrd and the root partition
59-
* @return {Object} It returns a object containing key value pairs
60-
* if no value is provided, then its just true
56+
* @access private
57+
* @param {String} cmdline This string contains information about the
58+
* initrd and the root partition
59+
* @return {Object} It returns a object containing key/value pairs
60+
* if there is no value for the key then its just true.
61+
* **For more Information, look at the example**
6162
* @example
62-
* var cmdline = 'initrd=\\initramfs-linux.img root=PARTUUID=place_uuid_here\n'
63+
* var cmdline1 = 'initrd=\\initramfs-linux.img root=PARTUUID=someuuidhere\n'
64+
* var cmdline2 = 'somevar root=PARTUUID=someuuidhere\n'
6365
*
64-
* var res = linuxCmdline(cmdline)
65-
* console.log(res) => { initrd: '\\initramfs-linux.img',
66-
* root: 'PARTUUID=uuid'}
66+
* var res1 = linuxCmdline(cmdline1)
67+
* var res2 = linuxCmdline(cmdline2)
68+
* console.log(res1)
69+
* //-> { initrd: '\\initramfs-linux.img',root: 'PARTUUID=someuuidhere' }
70+
* console.log(res2)
71+
* //-> { somevar: true, root: 'PARTUUID=someuuidhere' }
6772
*/
6873
function linuxCmdline(cmdline)
6974
{

0 commit comments

Comments
 (0)