make it easier to redefine /proc for testing/debugging
This commit is contained in:
1 parent
7c83c105d4
commit
f2b304ea3c
2 files changed
+20
-20
No files matched your search
+3
-3
@@ -83,10 +83,10 @@ char *sigar_proc_filename(char *buffer, int buflen,
|
||||
char *pid_str = sigar_uitoa(pid_buf, pid, &len);
|
||||
|
||||
assert((unsigned int)buflen >=
|
||||
(SSTRLEN(PROC_FS_ROOT) + UITOA_BUFFER_SIZE + fname_len + 1));
|
||||
(SSTRLEN(PROCP_FS_ROOT) + UITOA_BUFFER_SIZE + fname_len + 1));
|
||||
|
||||
memcpy(ptr, PROC_FS_ROOT, SSTRLEN(PROC_FS_ROOT));
|
||||
ptr += SSTRLEN(PROC_FS_ROOT);
|
||||
memcpy(ptr, PROCP_FS_ROOT, SSTRLEN(PROCP_FS_ROOT));
|
||||
ptr += SSTRLEN(PROCP_FS_ROOT);
|
||||
|
||||
memcpy(ptr, pid_str, len);
|
||||
ptr += len;
|
||||
|
||||
Reference in new issue
Block a user