copy/v86

Support changing 9p mount tag at runtime

Aperta

#678 aperta il 8 giu 2022

 (10 commenti) (0 reazioni) (0 assegnatari)JavaScript (1880 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (23.416 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

It would be helpful to be able to change the name of the 9p file share. https://github.com/copy/v86/blob/4eb1e5035e91490c5aeebab45553d5043cd84b95/lib/9p.js#L82

For dynamically generating mount tags:

/**
 * @param {string} mountTagName
 */
function genMountTagArray(mountTagName) {
    /**
     * @type {Number[]}
     */
    let _mountTagArray;
    Array.from(mountTagName).forEach(function(char) {
        _mountTagArray.push(char.charCodeAt(0));
    });
    return _mountTagArray;
};

Guida contributor