mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-27 18:40:57 +12:00
Replaced my spaces with tabs
This commit is contained in:
parent
f340fa6a48
commit
224c065eed
|
@ -4,7 +4,7 @@
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@ -1258,7 +1258,7 @@ namespace Proc {
|
||||||
int filter_found = 0;
|
int filter_found = 0;
|
||||||
|
|
||||||
detail_container detailed;
|
detail_container detailed;
|
||||||
constexpr size_t KTHREADD = 2;
|
constexpr size_t KTHREADD = 2;
|
||||||
|
|
||||||
//* Generate process tree list
|
//* Generate process tree list
|
||||||
void _tree_gen(proc_info& cur_proc, vector<proc_info>& in_procs, vector<std::reference_wrapper<proc_info>>& out_procs, int cur_depth, const bool collapsed, const string& filter, bool found=false, const bool no_update=false, const bool should_filter=false) {
|
void _tree_gen(proc_info& cur_proc, vector<proc_info>& in_procs, vector<std::reference_wrapper<proc_info>>& out_procs, int cur_depth, const bool collapsed, const string& filter, bool found=false, const bool no_update=false, const bool should_filter=false) {
|
||||||
|
@ -1491,18 +1491,18 @@ namespace Proc {
|
||||||
//? Iterate over all pids in /proc
|
//? Iterate over all pids in /proc
|
||||||
vector<size_t> found;
|
vector<size_t> found;
|
||||||
for (const auto& d: fs::directory_iterator(Shared::procPath)) {
|
for (const auto& d: fs::directory_iterator(Shared::procPath)) {
|
||||||
if (Runner::stopping)
|
if (Runner::stopping)
|
||||||
return current_procs;
|
return current_procs;
|
||||||
if (pread.is_open()) pread.close();
|
if (pread.is_open()) pread.close();
|
||||||
|
|
||||||
const string pid_str = d.path().filename();
|
const string pid_str = d.path().filename();
|
||||||
if (not isdigit(pid_str[0])) continue;
|
if (not isdigit(pid_str[0])) continue;
|
||||||
|
|
||||||
const size_t pid = stoul(pid_str);
|
const size_t pid = stoul(pid_str);
|
||||||
|
|
||||||
if (should_filter_kernel && pid == KTHREADD) {
|
if (should_filter_kernel && pid == KTHREADD) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
found.push_back(pid);
|
found.push_back(pid);
|
||||||
|
|
||||||
//? Check if pid already exists in current_procs
|
//? Check if pid already exists in current_procs
|
||||||
|
@ -1596,7 +1596,7 @@ namespace Proc {
|
||||||
continue;
|
continue;
|
||||||
case 4: //? Parent pid
|
case 4: //? Parent pid
|
||||||
new_proc.ppid = stoull(short_str);
|
new_proc.ppid = stoull(short_str);
|
||||||
next_x = 14;
|
next_x = 14;
|
||||||
continue;
|
continue;
|
||||||
case 14: //? Process utime
|
case 14: //? Process utime
|
||||||
cpu_t = stoull(short_str);
|
cpu_t = stoull(short_str);
|
||||||
|
@ -1635,11 +1635,11 @@ namespace Proc {
|
||||||
catch (const std::out_of_range&) { continue; }
|
catch (const std::out_of_range&) { continue; }
|
||||||
|
|
||||||
pread.close();
|
pread.close();
|
||||||
|
|
||||||
if (should_filter_kernel && new_proc.ppid == KTHREADD) {
|
if (should_filter_kernel && new_proc.ppid == KTHREADD) {
|
||||||
current_procs.pop_back();
|
current_procs.pop_back();
|
||||||
found.pop_back();
|
found.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x-offset < 24) continue;
|
if (x-offset < 24) continue;
|
||||||
|
|
||||||
|
@ -1682,7 +1682,6 @@ namespace Proc {
|
||||||
|
|
||||||
old_cputimes = cputimes;
|
old_cputimes = cputimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
//* ---------------------------------------------Collection done-----------------------------------------------
|
//* ---------------------------------------------Collection done-----------------------------------------------
|
||||||
|
|
||||||
//* Sort processes
|
//* Sort processes
|
||||||
|
|
Loading…
Reference in a new issue