Skip to content

Commit

Permalink
Merge pull request #175 from jpoimboe/kpatch-list
Browse files Browse the repository at this point in the history
kpatch: show loaded modules in list command
  • Loading branch information
sjenning committed May 6, 2014
2 parents 74fb803 + 49f832c commit 135b438
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kpatch/kpatch
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,24 @@ case "$1" in

"list")
[[ "$#" -ne 1 ]] && usage
echo "System installed patches:"
echo "Loaded patch modules:"
for module in /sys/kernel/kpatch/patches/*; do
if [[ -e $module ]] && [[ $(cat $module/enabled) -eq 1 ]]; then
echo_patch_name $module
fi
done
echo ""
echo "System installed patch modules:"
for i in "$SYSDIR"/*.ko; do
[[ -e "$i" ]] || continue
echo_patch_name $i
done
echo ""
echo "User installed patches:"
echo "User installed patch modules:"
for i in "$USERDIR"/*.ko; do
[[ -e "$i" ]] || continue
echo_patch_name $i
done
echo ""
;;

"info")
Expand Down

0 comments on commit 135b438

Please sign in to comment.