Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] tools: intel_gpu_abrt "get" function
@ 2012-12-13 16:11 Rodrigo Vivi
  2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2012-12-13 16:11 UTC (permalink / raw)
  To: intel-gfx

A function to make it easy to collect any file or directory needed later.
---
 tools/intel_gpu_abrt | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index 141a524..b243a5f 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -1,5 +1,13 @@
 #!/bin/sh
 
+get(){
+    if [ ! -e $tardir/${@:$#} ] ; then
+	mkdir -p $tardir/${@:$#}
+    fi
+    if [ -e $1 ] ; then
+	cp -a ${@:1:$#-1} $tardir/${@:$#} 2>/dev/null
+    fi
+}
 if [ -d /debug/dri ] ; then
 	debugfs_path=/debug_dri
 fi
@@ -25,15 +33,15 @@ tmpdir=`mktemp -d`
 tardir=$tmpdir/intel_gpu_abrt
 mkdir $tardir
 
-mkdir $tardir/debugfs
-cp $i915_debugfs/* $tardir/debugfs
+get $i915_debugfs/* debugfs
 
-mkdir $tardir/mod_opts
-cp /sys/module/i915/parameters/* $tardir/mod_opts
+get /sys/module/i915/parameters/* mod_opts
 
 mkdir $tardir/X
-cp /var/log/Xorg.*.log $tardir/X
-cp /etc/X11/xorg.conf $tardir/X
+get /var/log/Xorg.0.log X
+get /var/log/Xorg.0.log.old X
+get /etc/X11/xorg.conf X
+get /etc/X11/xorg.conf.d/ X
 
 dmesg > $tardir/dmesg
 lspci -nn > $tardir/lspci
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-13 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 16:11 [PATCH 1/4] tools: intel_gpu_abrt "get" function Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 2/4] tools: intel_gpu_abrt collecting more useful info Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 3/4] tools: intel_gpu_abrt checking for root access Rodrigo Vivi
2012-12-13 16:11 ` [PATCH 4/4] tools: intel_gpu_abrt bug report template Rodrigo Vivi
2012-12-13 17:16   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox