From 51512bad2ab9e384344f96191834583f110b4a17 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 21 Sep 2009 00:28:05 +0000 Subject: SATA checkpoint to iterate IDE devices works now. More testing will be needed to determine if any device skipping happens if both IDE and SATA devices are connected at the same time. --- Makefile | 2 +- netnuke.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 79af20b..7008970 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS=-std=c99 -Wall -pipe -O2 +CFLAGS=-std=c99 -Wall -pipe -O2 -fomit-frame-pointer DEFINES= LFLAGS=-lutil -ltermcap PACKAGE=netnuke diff --git a/netnuke.c b/netnuke.c index 7265733..1a22711 100644 --- a/netnuke.c +++ b/netnuke.c @@ -298,8 +298,11 @@ void buildMediaList(media_t devices[]) #ifdef __FreeBSD__ /* Account for SATA devices. mediaList will always have IDE/SATA as position 0 */ - if(device.usable != USABLE_MEDIA && mt == 0 && i > 5) - mt++; + if(device.usable != USABLE_MEDIA && mt == 0 && i < 4) + { + i++; + continue; + } #endif /* Primative statistics collection, also in this case device.usable -- cgit