2006-11-27 Esteban Sánchez <estebans@artica.es>
* pandora_strutils.h, pandora_strutils.cc: strtoulong() now returns an unsigned long long. This will finally fixes the bug with freedisk big amounts. * windows/pandora_wmi.cc: Now the space amount is a unsigned long long enough to amounts up to PB (billions of GB). * bin/PandoraAgent.exe: Updated to new commit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a2c606fdc4
commit
9da0f8b99c
|
@ -1,3 +1,14 @@
|
|||
2006-11-27 Esteban Sánchez <estebans@artica.es>
|
||||
|
||||
* pandora_strutils.h, pandora_strutils.cc: strtoulong() now returns an
|
||||
unsigned long long. This will finally fixes the bug with freedisk big
|
||||
amounts.
|
||||
|
||||
* windows/pandora_wmi.cc: Now the space amount is a unsigned long
|
||||
long enough to amounts up to PB (billions of GB).
|
||||
|
||||
* bin/PandoraAgent.exe: Updated to new commit.
|
||||
|
||||
2006-11-24 Esteban Sánchez <estebans@artica.es>
|
||||
|
||||
* pandora_strutils.h, pandora_strutils.cc: Added strtoulong() to
|
||||
|
|
Binary file not shown.
|
@ -129,14 +129,13 @@ Pandora_Strutils::strtoint (const string str) {
|
|||
* @exception Invalid_Conversion throwed if the string has non-
|
||||
* decimal values.
|
||||
*/
|
||||
unsigned long
|
||||
unsigned long long
|
||||
Pandora_Strutils::strtoulong (const string str) {
|
||||
unsigned long result;
|
||||
unsigned long long result;
|
||||
|
||||
if (! std::sscanf (str.c_str (), "%uld", &result)) {
|
||||
if (! std::sscanf (str.c_str (), "%I64d", &result)) {
|
||||
throw Invalid_Conversion ();
|
||||
}
|
||||
printf ("%s - %u\n", str.c_str (), result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -41,16 +41,16 @@ namespace Pandora_Strutils {
|
|||
*/
|
||||
class Invalid_Conversion : Pandora_Strutils::String_Exception {};
|
||||
|
||||
string trim (const string str);
|
||||
string trim (const string str);
|
||||
|
||||
string inttostr (const int i);
|
||||
string longtostr (const long i);
|
||||
string longtohex (const long i);
|
||||
string inttostr (const int i);
|
||||
string longtostr (const long i);
|
||||
string longtohex (const long i);
|
||||
|
||||
int strtoint (const string str);
|
||||
unsigned long strtoulong (const string str);
|
||||
int strtoint (const string str);
|
||||
unsigned long long strtoulong (const string str);
|
||||
|
||||
string strreplace (string in, string pattern, string rep);
|
||||
string strreplace (string in, string pattern, string rep);
|
||||
|
||||
void
|
||||
stringtok (list<string> &l, string const &s,
|
||||
|
|
|
@ -155,10 +155,10 @@ Pandora_Wmi::isServiceRunning (string service_name) {
|
|||
*/
|
||||
unsigned long
|
||||
Pandora_Wmi::getDiskFreeSpace (string disk_id) {
|
||||
CDhInitialize init;
|
||||
CDispPtr wmi_svc, quickfixes;
|
||||
string id, space_str;
|
||||
unsigned long space;
|
||||
CDhInitialize init;
|
||||
CDispPtr wmi_svc, quickfixes;
|
||||
string id, space_str;
|
||||
unsigned long long space = 0;
|
||||
|
||||
struct QFix {
|
||||
CDhStringA id, free_space;
|
||||
|
|
Loading…
Reference in New Issue