summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'storaged/storaged_service.cpp')
-rw-r--r--storaged/storaged_service.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/storaged/storaged_service.cpp b/storaged/storaged_service.cpp
index 007b75c41..8624b3b6b 100644
--- a/storaged/storaged_service.cpp
+++ b/storaged/storaged_service.cpp
@@ -91,6 +91,7 @@ status_t Storaged::dump(int fd, const Vector<String16>& args) {
91 int hours = 0; 91 int hours = 0;
92 int time_window = 0; 92 int time_window = 0;
93 uint64_t threshold = 0; 93 uint64_t threshold = 0;
94 bool force_report = false;
94 for (size_t i = 0; i < args.size(); i++) { 95 for (size_t i = 0; i < args.size(); i++) {
95 const auto& arg = args[i]; 96 const auto& arg = args[i];
96 if (arg == String16("--hours")) { 97 if (arg == String16("--hours")) {
@@ -111,10 +112,14 @@ status_t Storaged::dump(int fd, const Vector<String16>& args) {
111 threshold = stoll(String16::std_string(args[i])); 112 threshold = stoll(String16::std_string(args[i]));
112 continue; 113 continue;
113 } 114 }
115 if (arg == String16("--force")) {
116 force_report = true;
117 continue;
118 }
114 } 119 }
115 120
116 const std::map<uint64_t, std::vector<struct uid_record>>& records = 121 const std::map<uint64_t, std::vector<struct uid_record>>& records =
117 storaged.get_uid_records(hours, threshold); 122 storaged.get_uid_records(hours, threshold, force_report);
118 for (const auto& it : records) { 123 for (const auto& it : records) {
119 dprintf(fd, "%llu\n", (unsigned long long)it.first); 124 dprintf(fd, "%llu\n", (unsigned long long)it.first);
120 for (const auto& record : it.second) { 125 for (const auto& record : it.second) {