Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149490156
D10429.id27559.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
990 B
Referenced Files
None
Subscribers
None
D10429.id27559.diff
View Options
Index: usr.sbin/crashinfo/crashinfo.sh
===================================================================
--- usr.sbin/crashinfo/crashinfo.sh
+++ usr.sbin/crashinfo/crashinfo.sh
@@ -45,9 +45,13 @@
k=$1 ; shift
if [ -x /usr/local/bin/gdb ]; then
- /usr/local/bin/gdb -batch -ex "$@" $k
+ /usr/local/bin/gdb --quiet -batch -ex "$@" $k
+ elif [ -x /usr/bin/gdb ]; then
+ echo -e "$@" | /usr/bin/gdb --quiet -x /dev/stdin -batch $k
else
- echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k
+ echo "Please install GDB and run 'crashinfo' again." >&2
+ echo "The easiest way to install GDB is: pkg install gdb" >&2
+ return 1
fi
}
@@ -71,8 +75,7 @@
# Look for a matching kernel version.
for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do
- kvers=$(gdb_command $k 'printf " Version String: %s", version' \
- 2>/dev/null)
+ kvers=$(gdb_command $k 'printf " Version String: %s", version')
if [ "$ivers" = "$kvers" ]; then
KERNEL=$k
break
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 25, 7:34 PM (13 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30341757
Default Alt Text
D10429.id27559.diff (990 B)
Attached To
Mode
D10429: crashinfo: add "batch" mode and use it during boot
Attached
Detach File
Event Timeline
Log In to Comment