Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
0939e5cb
Commit
0939e5cb
authored
6 years ago
by
Hisham Muhammad
Browse files
Options
Download
Email Patches
Plain Diff
Settings: fix default and storage of sort keys
parent
e1c2dc56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Settings.c
+4
-1
Settings.c
linux/Platform.c
+1
-1
linux/Platform.c
with
5 additions
and
2 deletions
+5
-2
Settings.c
View file @
0939e5cb
...
...
@@ -216,6 +216,9 @@ static void Settings_defaultMeters(Settings* this) {
}
static
const
char
*
toFieldName
(
int
i
)
{
if
(
i
<
0
||
i
>
LAST_PROCESSFIELD
)
{
return
""
;
}
return
Process_fields
[
i
].
name
;
}
...
...
@@ -275,7 +278,7 @@ static void Settings_defaultScreens(Settings* this) {
for
(
unsigned
int
i
=
0
;
i
<
Platform_numberOfDefaultScreens
;
i
++
)
{
ScreenDefaults
*
defaults
=
&
Platform_defaultScreens
[
i
];
Settings_newScreen
(
this
,
defaults
->
name
,
defaults
->
columns
);
this
->
screens
[
0
]
->
sortKey
=
toFieldIndex
(
defaults
->
sortKey
);
this
->
screens
[
i
]
->
sortKey
=
toFieldIndex
(
defaults
->
sortKey
);
}
}
...
...
This diff is collapsed.
Click to expand it.
linux/Platform.c
View file @
0939e5cb
...
...
@@ -101,7 +101,7 @@ ScreenDefaults Platform_defaultScreens[] = {
{
.
name
=
"L1 Data Cache"
,
.
columns
=
"PID USER PERCENT_CPU L1DREADS L1DRMISSES L1DWRITES L1DWMISSES Command"
,
.
sortKey
=
"L
D
1READS"
,
.
sortKey
=
"L1
D
READS"
,
},
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment