mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
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
671ef464cd
commit
611d7e3e1e
@ -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>
|
2006-11-24 Esteban Sánchez <estebans@artica.es>
|
||||||
|
|
||||||
* pandora_strutils.h, pandora_strutils.cc: Added strtoulong() to
|
* 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-
|
* @exception Invalid_Conversion throwed if the string has non-
|
||||||
* decimal values.
|
* decimal values.
|
||||||
*/
|
*/
|
||||||
unsigned long
|
unsigned long long
|
||||||
Pandora_Strutils::strtoulong (const string str) {
|
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 ();
|
throw Invalid_Conversion ();
|
||||||
}
|
}
|
||||||
printf ("%s - %u\n", str.c_str (), result);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ namespace Pandora_Strutils {
|
|||||||
string longtohex (const long i);
|
string longtohex (const long i);
|
||||||
|
|
||||||
int strtoint (const string str);
|
int strtoint (const string str);
|
||||||
unsigned long strtoulong (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);
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ Pandora_Wmi::getDiskFreeSpace (string disk_id) {
|
|||||||
CDhInitialize init;
|
CDhInitialize init;
|
||||||
CDispPtr wmi_svc, quickfixes;
|
CDispPtr wmi_svc, quickfixes;
|
||||||
string id, space_str;
|
string id, space_str;
|
||||||
unsigned long space;
|
unsigned long long space = 0;
|
||||||
|
|
||||||
struct QFix {
|
struct QFix {
|
||||||
CDhStringA id, free_space;
|
CDhStringA id, free_space;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user