lib/zpool.js
function list(opts, cb) {
    //list the statistics from a (specific) pool. -o option is NOT available
    "use strict";

    if (typeof opts === 'function') {
        cb = opts;
        opts = undefined;
    }

    var params = ['list', '-H'];

    if (opts && opts.name) {
        params.push(opts.name);
    }

    zpool(params, function (err, stdout) {
        if (cb && typeof cb === 'function') {
            if (err) {
                cb(err);
                return;
            }
            var lines = util.compact(stdout.split('\n'));
            var list = lines.map(function (x) { return new ZPool(x); });
            cb(err, list);
        }
    });
}
function list(opts, cb) {
    //list the statistics from a (specific) pool. -o option is NOT available
    "use strict";

    if (typeof opts === 'function') {
        cb = opts;
        opts = undefined;
    }

    var params = ['list', '-H'];

    if (opts && opts.name) {
        params.push(opts.name);
    }

    zpool(params, function (err, stdout) {
        if (cb && typeof cb === 'function') {
            if (err) {
                cb(err);
                return;
            }
            var lines = util.compact(stdout.split('\n'));
            var list = lines.map(function (x) { return new ZPool(x); });
            cb(err, list);
        }
    });
}
function list ( opts , cb ) { //list the statistics from a (specific) pool. -o option is NOT available "use strict" ; if ( typeof opts === 'function' ) { cb = opts ; opts = undefined ; } var params = [ 'list' , '-H' ] ; if ( opts && opts . name ) { params . push ( opts . name ) ; } zpool ( params , function ( err , stdout ) { if ( cb && typeof cb === 'function' ) { if ( err ) { cb ( err ) ; return ; } var lines = util . compact ( stdout . split ( '\n' ) ) ; var list = lines . map ( function ( x ) { return new ZPool ( x ) ; } ) ; cb ( err , list ) ; } } ) ; }
/*

Lists the given pools along with a health status and space usage. If
no pools are specified, all pools in the system are listed.

PARAMS:
opts: {
name: String, //optional, the name of the pool for which to list the status
}
/ *