diff --git a/vxloader/vxloader.c b/vxloader/vxloader.c index 7b98270..1ebbc3c 100644 --- a/vxloader/vxloader.c +++ b/vxloader/vxloader.c @@ -369,12 +369,15 @@ int main(int argc, char **argv) return vx_boot(name) != 0; } - /* probe the cards until found */ + /* probe the all cards */ for (c = 0; c < SND_CARDS; c++) { sprintf(name, "hw:%d", c); if (! vx_boot(name)) - return 0; + card = c; } - fprintf(stderr, PROGNAME ": no VX-compatible cards found\n"); - return 1; + if (card < 0) { + fprintf(stderr, PROGNAME ": no VX-compatible cards found\n"); + return 1; + } + return 0; }