summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayanth Othayoth <ojayanth@in.ibm.com>2017-08-09 07:06:45 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-08-22 20:48:18 +0000
commitf1e02d3357a9147537c0cc2dceb202ac7a5d9b06 (patch)
tree196df7e33a2e2647d4be36b35e9ae379ec0c3767
parente61aee3343dfd92a5d693227bf6ff738aa3ab987 (diff)
downloadphosphor-debug-collector-f1e02d3357a9147537c0cc2dceb202ac7a5d9b06.tar.gz
phosphor-debug-collector-f1e02d3357a9147537c0cc2dceb202ac7a5d9b06.zip
dreport: Implementation of data collection function
Added support for running command in the command array and save the data into specified location. Added file level size check function, which helps to cap the final dreport log based on size provided by user. Change-Id: I5bb0f2629bf4b4dd7b86b6dd97d205c413af6fcf Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
-rwxr-xr-xtools/dreport15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/dreport b/tools/dreport
index 42b9733..03f6e13 100755
--- a/tools/dreport
+++ b/tools/dreport
@@ -305,6 +305,21 @@ function run_command()
fi
}
+# @brief Capture debug data based on the input command array.
+# and stores in to global temporary name specific location.
+# @param $1 Source array
+# @return 0 on success, error code otherwise
+function capture_data()
+{
+ source=("$@")
+
+ for ((i=0;i<${#source[@]};i+=1)); do
+ ${source[i]}
+ done
+
+ return 0
+}
+
# @brief Calculate file or directory compressed size based on input
# and check whether the size in the the allowed size limit.
# Remove the file or directory from the name_dir
OpenPOWER on IntegriCloud