> in /usr/src/cmd/zpool/zpool_main.c :
>

at line 680 forwards we can probably check for this scenario :

if ( ( altroot != NULL ) && ( altroot[0] != '/') ) {
    (void) fprintf(stderr, gettext("invalid alternate root '%s': "
    "must be an absolute path\n"), altroot);
    nvlist_free(nvroot);
    return (1);
}

    /*  some altroot has been specified      *
     *  thus altroot[0] and altroot[1] exist */

else if ( ( altroot[0] = '/') && ( altroot[1] = '\0') ) {
    (void) fprintf(stderr, "Do not specify / as alternate root.\n");
    nvlist_free(nvroot);
    return (1);
}


not perfect .. but something along those lines.


Dennis

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to