X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=breezed.git;a=blobdiff_plain;f=breezed.cc;h=ae61293dd6a1c1e6ee13178ed07a0a72bc405e0c;hp=431cde3665dd2aeb6fbdfcd96419ea7a7514bff6;hb=cc0ac686484d98f82ce80cb665c76d9626605595;hpb=750d2fa8cc39092716eb832cba4c709e36080013 diff --git a/breezed.cc b/breezed.cc index 431cde3..ae61293 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,7 +37,7 @@ 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; @@ -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); @@ -470,6 +471,10 @@ Written by Francois Fleuret (francois@fleuret.org).\n"; cout << " " << t; } + // So that we can deal with the new files where the + // temperature are in 1/1000th of C + if(t > 1000) t /= 1000; + if(t > temperature) temperature = t; } }