#!/bin/bash # # Copyright (c) 2011 Bryan Schumaker # # Script for easier NFSD fault injection # Check that debugfs has been mounted DEBUGFS=`cat /proc/mounts | grep debugfs` if [ "$DEBUGFS" == "" ]; then echo "debugfs does not appear to be mounted!" echo "Please mount debugfs and try again" exit 1 fi # Check that the fault injection directory exists DEBUGDIR=`echo $DEBUGFS | awk '{print $2}'`/nfsd if [ ! -d "$DEBUGDIR" ]; then echo "$DEBUGDIR does not exist" echo "Check that your .config selects CONFIG_NFSD_FAULT_INJECTION" exit 1 fi function help() { echo "Usage $0 injection_type [count]" echo "" echo "Injection types are:" ls $DEBUGDIR exit 1 } if [ $# == 0 ]; then help elif [ ! -f $DEBUGDIR/$1 ]; then help elif [ $# != 2 ]; then COUNT=0 else COUNT=$2 fi BEFORE=`mktemp` AFTER=`mktemp` dmesg > $BEFORE echo $COUNT > $DEBUGDIR/$1 dmesg > $AFTER # Capture lines that only exist in the $AFTER file diff $BEFORE $AFTER | grep ">" rm -f $BEFORE $AFTER 5a6dd63'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-11 02:31:11 -0500
commit35eeacf1820a08305c2b0960febfa190f5a6dd63 (patch)
treef1227c7384ee01d3f029cc5f82223234e6456c5f /include/net/af_unix.h
parentbed45f79a2afc9d7c279b880dfcac8f27d513b50 (diff)
parent1ee18329fae936089c6c599250ae92482ff2b81f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'include/net/af_unix.h')