code refine
parent
5857ce92fe
commit
41c6c6d17b
|
|
@ -1648,8 +1648,8 @@ static char *iniProccessFor(char *content, const int content_len,
|
||||||
logWarning("file: "__FILE__", line: %d, "
|
logWarning("file: "__FILE__", line: %d, "
|
||||||
"invalid step: %d for range: %.*s, set step to 1",
|
"invalid step: %d for range: %.*s, set step to 1",
|
||||||
__LINE__, step, rangeLen, pForRange);
|
__LINE__, step, rangeLen, pForRange);
|
||||||
step = 1;
|
*offset = (pEnd + _PREPROCESS_TAG_LEN_ENDFOR) - content;
|
||||||
count = 0;
|
return content;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1659,7 +1659,8 @@ static char *iniProccessFor(char *content, const int content_len,
|
||||||
logWarning("file: "__FILE__", line: %d, "
|
logWarning("file: "__FILE__", line: %d, "
|
||||||
"invalid step: %d for range: %.*s", __LINE__,
|
"invalid step: %d for range: %.*s", __LINE__,
|
||||||
step, rangeLen, pForRange);
|
step, rangeLen, pForRange);
|
||||||
count = 0;
|
*offset = (pEnd + _PREPROCESS_TAG_LEN_ENDFOR) - content;
|
||||||
|
return content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,8 @@ int get_boot_time(struct timeval *boot_time)
|
||||||
snprintf(left.f_mntonname, sizeof(left.f_mntonname), "%s", mntonname); \
|
snprintf(left.f_mntonname, sizeof(left.f_mntonname), "%s", mntonname); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
int get_mounted_filesystems(struct fast_statfs *stats, const int size, int *count)
|
int get_mounted_filesystems(struct fast_statfs *stats,
|
||||||
|
const int size, int *count)
|
||||||
{
|
{
|
||||||
#ifdef OS_LINUX
|
#ifdef OS_LINUX
|
||||||
const char *filename = "/proc/mounts";
|
const char *filename = "/proc/mounts";
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,8 @@ int get_boot_time(struct timeval *boot_time);
|
||||||
* count: return the count of the array
|
* count: return the count of the array
|
||||||
* return: error no , 0 success, != 0 fail
|
* return: error no , 0 success, != 0 fail
|
||||||
*/
|
*/
|
||||||
int get_mounted_filesystems(struct fast_statfs *stats, const int size, int *count);
|
int get_mounted_filesystems(struct fast_statfs *stats,
|
||||||
|
const int size, int *count);
|
||||||
|
|
||||||
#if defined(OS_LINUX) || defined(OS_FREEBSD)
|
#if defined(OS_LINUX) || defined(OS_FREEBSD)
|
||||||
/** get processes
|
/** get processes
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue