X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=breezed.cc;h=4f2302d0484bca579e6856e95824a29de94e48fb;hb=62f9018cb6a5ba63cbce4df55c4dc77d71056320;hp=6f079b2b181acad582cd825a758cc09a2f0967d0;hpb=14f485e5f1426556e96e7fdd8bfb9ad578bbb988;p=breezed.git diff --git a/breezed.cc b/breezed.cc index 6f079b2..4f2302d 100644 --- a/breezed.cc +++ b/breezed.cc @@ -3,7 +3,7 @@ breezed is a fan speed control daemon for Linux computers. - Copyright (c) 2008 Francois Fleuret + Copyright (c) 2008, 2009 Francois Fleuret Written by Francois Fleuret This file is part of breezed. @@ -37,11 +37,11 @@ using namespace std; const int major_version_number = 1; -const int minor_version_number = 0; +const int minor_version_number = 2; const int buffer_size = 1024; -const char *default_confguration_file = "/etc/breezed.conf"; +const char *default_configuration_file = "/etc/breezed.conf"; // The time period to check the temperature. const int polling_delay = 5; @@ -182,8 +182,8 @@ int main(int argc, char **argv) { char buffer[buffer_size], token[buffer_size]; - configuration_file = new char[strlen(default_confguration_file) + 1]; - strcpy(configuration_file, default_confguration_file); + configuration_file = new char[strlen(default_configuration_file) + 1]; + strcpy(configuration_file, default_configuration_file); int i = 1; while(i < argc) { @@ -321,6 +321,7 @@ Written by Francois Fleuret (francois@fleuret.org).\n"; if(configuration_file) { ifstream cf(configuration_file); + if(cf.fail()) { cerr << "Can not open " << configuration_file << " for reading." << endl; exit(1);