aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-06-04 14:13:53 +0200
committerWynn Wolf Arbor2020-06-04 14:13:53 +0200
commit1a7eb1654bac6d3ac92fcf251444dc80dea16204 (patch)
treee898bd35b6178ed8e5e487ce5736437e8f3f1f4d
parent988bc7061938720152169cadaa6ed2bd9af6270b (diff)
downloadkern-1a7eb1654bac6d3ac92fcf251444dc80dea16204.tar.gz
Rename get_current_kernel to get_selected_kernel
In a similar vein to commit 5f83bed ("Use consistent and explicit terminology in set_kernel()"), the term "current" kernel is ambiguous here. An upcoming commit will introduce the concept of the "running config", which is the kernel configuration the currently running kernel uses. To reduce any ambiguity, use "selected" instead of "current".
-rwxr-xr-xkern6
1 files changed, 3 insertions, 3 deletions
diff --git a/kern b/kern
index d95ab9b..9c49ef7 100755
--- a/kern
+++ b/kern
@@ -26,18 +26,18 @@ get_latest_kernel() {
eselect --brief kernel list | tail -n1
}
-get_current_kernel() {
+get_selected_kernel() {
basename "$(eselect --brief kernel show 2>/dev/null)"
}
set_kernel() {
kern=${1:-$(get_latest_kernel)}
- current=$(get_current_kernel)
+ selected=$(get_selected_kernel)
kerndir=$SRCDIR/$kern
test -d "$kerndir" || errx "No such file or directory: $kerndir"
- if test "$kern" = "$current"; then
+ if test "$kern" = "$selected"; then
err "Warning: Latest kernel already selected: $kern"
return
fi