Skip to contentSkip to conversation

alsa-info.sh: include 1 line of dmesg context

PATCH Applied Wu Fengguang 2 participants 2 messages Jul 18, 2009 – Jul 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-info.sh: include 1 line of dmesg context

So as to include possible ALSA messages without the common keywords, as well as be more confident on the completeness/coverage of the report.

It also shows nice '--' separators between the dmesg ranges.

---
 utils/alsa-info.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/alsa-info.sh +1 -1
@@ -247,7 +247,7 @@ withdmesg() {
 	echo "!!ALSA/HDA dmesg" >> $FILE
 	echo "!!------------------" >> $FILE
 	echo "" >> $FILE
-	dmesg | grep -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
+	dmesg | grep -C1 -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
 	echo "" >> $FILE
 	echo "" >> $FILE
 }
Applied
#1 lore raw

At Sat, 18 Jul 2009 10:28:13 +0800,

Quoted 7 lines · Wu Fengguang

So as to include possible ALSA messages without the common keywords, as well as be more confident on the completeness/coverage of the report.

It also shows nice '--' separators between the dmesg ranges.

Thanks, applied now.

Takashi

Quoted 16 lines
---
 utils/alsa-info.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/alsa-info.sh +1 -1
@@ -247,7 +247,7 @@ withdmesg() {
 	echo "!!ALSA/HDA dmesg" >> $FILE
 	echo "!!------------------" >> $FILE
 	echo "" >> $FILE
-	dmesg | grep -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
+	dmesg | grep -C1 -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
 	echo "" >> $FILE
 	echo "" >> $FILE
 }