From 557feb269601a9328426c8c91148c41623c059c2 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 17 Aug 2007 11:36:01 +0000 Subject: [PATCH] Fix error message when a chip is specified on the command line with no prefix and that chip isn't found. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4681 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/sensors/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 6da5e391..6cba537f 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -237,7 +237,7 @@ int main (int argc, char *argv[]) sensors_cleanup(); exit(error); } else { - if(chips[0].prefix == SENSORS_CHIP_NAME_PREFIX_ANY) + if (optind == argc) /* No chip name on command line */ fprintf(stderr, "No sensors found!\n" "Make sure you loaded all the kernel drivers you need.\n"