Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
executable file 27 lines (24 sloc) 949 Bytes
# Outputs rows of comma separated values of the number of sysfs attributes
# documented over time from v2.6.12 till v4.16-rc3
# Kernel Version, Number of Documented Attributes
print_stats () {
local file="sysfs_stats.txt"
if [ ! -f "$file" ] ; then
# if not create the file
touch "$file"
echo "KernelVersion, DocumentedAttributes"
echo -n "$1, " >> "$file"
git -C $kernel_path checkout $1
OUTPUT="$(grep -r '^What:' $kernel_path/Documentation/ABI/* --exclude-dir=$kernel_path/Documentation/ABI/obsolete | wc -l)"
echo "$OUTPUT" >> "$file"
git -C $kernel_path checkout master
git -C $kernel_path clean -fxd
git -C $kernel_path reset --hard linux-next/master
for i in {12..39}; do print_stats v2.6.$i; done
for i in {1..19}; do print_stats v3.$i; done
for i in {1..15}; do print_stats v4.$i; done
print_stats v4.16-rc3