[Pkg-alsa-devel] Bug#258303: [patch] alsaconf broken by change in pciutils

Sergio Gelato Sergio Gelato <Sergio.Gelato@astro.su.se>, 258303@bugs.debian.org
Thu, 15 Jul 2004 12:40:11 +0200


The problem is due to a change in the output format of lspci -n.
Here is a patch that should make alsaconf work with both the old and
the new output format.

--- alsaconf/alsaconf.in.orig	Mon Apr 19 16:43:26 2004
+++ alsaconf/alsaconf.in	Thu Jul 15 12:37:00 2004
@@ -501,7 +501,7 @@
 /^[<literal space><literal tab>]*PCI: /{
 	gsub(/0x/, "");
 	gsub(/=/, ":");
-	x = sprintf ("'$lspci' -n 2>/dev/null| grep '"'Class 0401'"' | grep %s", $2);
+	x = sprintf ("'$lspci' -n 2>/dev/null| grep '"' 0401: '"' | grep %s", $2);
 	if (system (x) == 0)
 		printf "%s %s\n", $2, driver >>"'"$FOUND"'"
 }