summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-03-05 18:10:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-03-05 18:10:51 -0500
commit05ef1c50e7c2f796460737a7a7c2d315dd166544 (patch)
tree2d6423856824019b445478ecab0fbc59d70a6ed5 /scripts
parent97c31606075b30d0c5d70e477f54bb3f222e048d (diff)
parenta528aca7f359f4b0b1d72ae406097e491a5ba9ea (diff)
downloadcachepc-linux-05ef1c50e7c2f796460737a7a7c2d315dd166544.tar.gz
cachepc-linux-05ef1c50e7c2f796460737a7a7c2d315dd166544.zip
Merge branch 'for-linus' into work.lookups
for the sake of namei.c fixes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c3
-rwxr-xr-xscripts/prune-kernel20
2 files changed, 22 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index e080746e1a6b..48958d3cec9e 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -594,7 +594,8 @@ static int ignore_undef_symbol(struct elf_info *info, const char *symname)
if (strncmp(symname, "_restgpr0_", sizeof("_restgpr0_") - 1) == 0 ||
strncmp(symname, "_savegpr0_", sizeof("_savegpr0_") - 1) == 0 ||
strncmp(symname, "_restvr_", sizeof("_restvr_") - 1) == 0 ||
- strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0)
+ strncmp(symname, "_savevr_", sizeof("_savevr_") - 1) == 0 ||
+ strcmp(symname, ".TOC.") == 0)
return 1;
/* Do not ignore this symbol */
return 0;
diff --git a/scripts/prune-kernel b/scripts/prune-kernel
new file mode 100755
index 000000000000..ab5034e1d081
--- /dev/null
+++ b/scripts/prune-kernel
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# because I use CONFIG_LOCALVERSION_AUTO, not the same version again and
+# again, /boot and /lib/modules/ eventually fill up.
+# Dumb script to purge that stuff:
+
+for f in "$@"
+do
+ if rpm -qf "/lib/modules/$f" >/dev/null; then
+ echo "keeping $f (installed from rpm)"
+ elif [ $(uname -r) = "$f" ]; then
+ echo "keeping $f (running kernel) "
+ else
+ echo "removing $f"
+ rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
+ rm -f "/boot/vmlinuz-$f" "/boot/config-$f"
+ rm -rf "/lib/modules/$f"
+ new-kernel-pkg --remove $f
+ fi
+done