All pastes #270036 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-12-07 00:42 UTC
rendered paste body
        for (device[3] = '0'; (device[3] <= '3') && notfound; device[3]++) {
                notfound = robo_probe(device);
        }
        device[3]--;



------------------------------------------------------------


        device = "eth0";

        while (1) {
                probe = robo_probe(device);
                if (probe == 0) break; /* found */

                device[3]++; /* eth0, eth1, ... */
                if (device[3] > 3) break;
        }

        if (probe != 0)
                return -ENODEV;