fix debug data extraction flow

The fix contains 3 changes:
1. stop deleting the devcoredump in fwdump script since the
   crash_reporter access it in a later stage
2. allow access to getpid syscall for iwlwifi_dump_processor since it
   used this syscall
3. add -f to rm command in post-stop of iwlwifi-dump-processor.conf
   since iwlwifi_dump_processor deletes this file before the post-stop

Change-Id: I1142c082dcb1d192723757256e6dbd72a892be33
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Reviewed-on: https://chrome-internal-review.googlesource.com/906148
Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Michael Golant <michael.golant@intel.com>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@google.com>
Reviewed-by: Michael Golant <michael.golant@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/intel-wifi-fw-dump/+/1925481
Commit-Queue: Kirtika Ruchandani <kirtika@chromium.org>
Commit-Queue: Eric Caruso <ejcaruso@chromium.org>
Auto-Submit: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Kirtika Ruchandani <kirtika@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
diff --git a/fwdump b/fwdump
index 0c47603..5b349ee 100755
--- a/fwdump
+++ b/fwdump
@@ -53,6 +53,5 @@
 logger -t fwdump "Saving debug dump to ${filename}"
 
 cat "/sys/${DEVPATH}/data" > "${filename}"
-echo 1 > "/sys/${DEVPATH}/data"
 
 start iwlwifi-dump-processor DUMP_FILE_PATH="${filename}"
diff --git a/sandbox/iwlwifi-dump-processor.conf b/sandbox/iwlwifi-dump-processor.conf
index 853f2b0..9d65b94 100644
--- a/sandbox/iwlwifi-dump-processor.conf
+++ b/sandbox/iwlwifi-dump-processor.conf
@@ -12,6 +12,6 @@
 
 # We don't want stale dump files sitting around so after we process
 # one we should get rid of it.
-post-stop exec rm "${DUMP_FILE_PATH}"
+post-stop exec rm -f "${DUMP_FILE_PATH}"
 
 exec iwlwifi_dump_processor "${DUMP_FILE_PATH}" > /var/log/last_iwlwifi_dump