From 02e08403e3a7794ba9a0510cac23b58f3056b2ed Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 22 Sep 2022 08:15:51 -0700 Subject: [PATCH] schema update --- docs/parsers/proc_pid_mountinfo.md | 4 +++- jc/parsers/proc_pid_mountinfo.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/parsers/proc_pid_mountinfo.md b/docs/parsers/proc_pid_mountinfo.md index 9e0a4e2e..f0114ee2 100644 --- a/docs/parsers/proc_pid_mountinfo.md +++ b/docs/parsers/proc_pid_mountinfo.md @@ -46,7 +46,7 @@ Schema: "fs_type": string, "mount_source": string, "super_options": [ - string + integer # [2] ], "super_options_fields": { "": string @@ -56,6 +56,8 @@ Schema: [0] if empty, then private mount [1] unbindable will always have a value of 0 + [2] integer conversions are attempted. Use --raw or raw=True for + original string values. Examples: diff --git a/jc/parsers/proc_pid_mountinfo.py b/jc/parsers/proc_pid_mountinfo.py index 72399911..2babb5bb 100644 --- a/jc/parsers/proc_pid_mountinfo.py +++ b/jc/parsers/proc_pid_mountinfo.py @@ -41,7 +41,7 @@ Schema: "fs_type": string, "mount_source": string, "super_options": [ - string + integer # [2] ], "super_options_fields": { "": string @@ -51,6 +51,8 @@ Schema: [0] if empty, then private mount [1] unbindable will always have a value of 0 + [2] integer conversions are attempted. Use --raw or raw=True for + original string values. Examples: @@ -200,7 +202,7 @@ def _process(proc_data: List[Dict]) -> List[Dict]: for field in s_options_fields: key, val = field.split('=') - entry['super_options_fields'][key] = val + entry['super_options_fields'][key] = jc.utils.convert_to_int(val) else: del entry['super_options']