mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
tweak comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
35def51c97
commit
9ec3cd400a
@ -198,7 +198,7 @@ int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
|
|||||||
memset(&currec, 0, sizeof(currec));
|
memset(&currec, 0, sizeof(currec));
|
||||||
while (fgets(buf, PROCPS_BUFSIZE, file)) {
|
while (fgets(buf, PROCPS_BUFSIZE, file)) {
|
||||||
// Each mapping datum has this form:
|
// Each mapping datum has this form:
|
||||||
// f7d29000-f7d39000 rw-s ADR M:m OFS FILE
|
// f7d29000-f7d39000 rw-s FILEOFS M:m INODE FILENAME
|
||||||
// Size: nnn kB
|
// Size: nnn kB
|
||||||
// Rss: nnn kB
|
// Rss: nnn kB
|
||||||
// .....
|
// .....
|
||||||
@ -223,7 +223,7 @@ int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
|
|||||||
tp = strchr(buf, '-');
|
tp = strchr(buf, '-');
|
||||||
if (tp) {
|
if (tp) {
|
||||||
// We reached next mapping - the line of this form:
|
// We reached next mapping - the line of this form:
|
||||||
// f7d29000-f7d39000 rw-s ADR M:m OFS FILE
|
// f7d29000-f7d39000 rw-s FILEOFS M:m INODE FILENAME
|
||||||
|
|
||||||
if (cb) {
|
if (cb) {
|
||||||
/* If we have a previous record, there's nothing more
|
/* If we have a previous record, there's nothing more
|
||||||
@ -242,7 +242,7 @@ int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
|
|||||||
|
|
||||||
strncpy(currec.smap_mode, tp, sizeof(currec.smap_mode)-1);
|
strncpy(currec.smap_mode, tp, sizeof(currec.smap_mode)-1);
|
||||||
|
|
||||||
// skipping "rw-s ADR M:m OFS "
|
// skipping "rw-s FILEOFS M:m INODE "
|
||||||
tp = skip_whitespace(skip_fields(tp, 4));
|
tp = skip_whitespace(skip_fields(tp, 4));
|
||||||
// filter out /dev/something (something != zero)
|
// filter out /dev/something (something != zero)
|
||||||
if (strncmp(tp, "/dev/", 5) != 0 || strcmp(tp, "/dev/zero\n") == 0) {
|
if (strncmp(tp, "/dev/", 5) != 0 || strcmp(tp, "/dev/zero\n") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user