* [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI
@ 2009-06-01 11:25 Ozan Çağlayan
2009-06-01 17:55 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Ozan Çağlayan @ 2009-06-01 11:25 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, Ozan Çağlayan
This commit adds system manufacturer and product name informations
acquired using dmidecode to the output of the alsa-info script.
Note that those informations will only be available when dmidecode
utility is installed and alsa-info is run with root privileges.
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
---
utils/alsa-info.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/utils/alsa-info.sh b/utils/alsa-info.sh
index f1660f8..4be4e05 100755
--- a/utils/alsa-info.sh
+++ b/utils/alsa-info.sh
@@ -400,6 +400,12 @@ ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
PAINST=$(which pulseaudio 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+DMIDECODE=$(which dmidecode 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+
+if [ -x $DMIDECODE ]; then
+ DMI_SYSTEM_MANUFACTURER=$($DMIDECODE -s system-manufacturer 2>/dev/null)
+ DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name 2>/dev/null)
+fi
cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp
cat /proc/asound/cards >$TEMPDIR/alsacards.tmp
@@ -431,6 +437,13 @@ echo "" >> $FILE
echo $DISTRO >> $FILE
echo "" >> $FILE
echo "" >> $FILE
+echo "!!DMI Information" >> $FILE
+echo "!!---------------" >> $FILE
+echo "" >> $FILE
+echo "Manufacturer: $DMI_SYSTEM_MANUFACTURER" >> $FILE
+echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE
+echo "" >> $FILE
+echo "" >> $FILE
echo "!!Kernel Information" >> $FILE
echo "!!------------------" >> $FILE
echo "" >> $FILE
--
1.6.3
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI
2009-06-01 11:25 [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI Ozan Çağlayan
@ 2009-06-01 17:55 ` Takashi Iwai
2009-06-01 20:05 ` Ozan Çağlayan
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2009-06-01 17:55 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: alsa-devel
At Mon, 1 Jun 2009 14:25:41 +0300,
Ozan Çağlayan wrote:
>
> This commit adds system manufacturer and product name informations
> acquired using dmidecode to the output of the alsa-info script.
>
> Note that those informations will only be available when dmidecode
> utility is installed and alsa-info is run with root privileges.
>
> Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Thanks, applied now.
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI
2009-06-01 17:55 ` Takashi Iwai
@ 2009-06-01 20:05 ` Ozan Çağlayan
2009-06-01 22:57 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Ozan Çağlayan @ 2009-06-01 20:05 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
> At Mon, 1 Jun 2009 14:25:41 +0300,
> Ozan Çağlayan wrote:
>
>> This commit adds system manufacturer and product name informations
>> acquired using dmidecode to the output of the alsa-info script.
>>
>> Note that those informations will only be available when dmidecode
>> utility is installed and alsa-info is run with root privileges.
>>
>> Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
>>
>
> Thanks, applied now.
>
Lennart proposed to read the DMI data from sysfs which makes much more
sense as the patch won't depend on the userspace dmidecode utility and
root privileges.
I'll change it and then resend it tomorrow.
Thanks
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI
2009-06-01 20:05 ` Ozan Çağlayan
@ 2009-06-01 22:57 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2009-06-01 22:57 UTC (permalink / raw)
To: Ozan Çağlayan; +Cc: alsa-devel
At Mon, 01 Jun 2009 23:05:07 +0300,
Ozan Çağlayan wrote:
>
> Takashi Iwai wrote:
> > At Mon, 1 Jun 2009 14:25:41 +0300,
> > Ozan Çağlayan wrote:
> >
> >> This commit adds system manufacturer and product name informations
> >> acquired using dmidecode to the output of the alsa-info script.
> >>
> >> Note that those informations will only be available when dmidecode
> >> utility is installed and alsa-info is run with root privileges.
> >>
> >> Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
> >>
> >
> > Thanks, applied now.
> >
>
> Lennart proposed to read the DMI data from sysfs which makes much more
> sense as the patch won't depend on the userspace dmidecode utility and
> root privileges.
Supporting both would be the best, as /sys isn't mandatory.
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-01 22:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 11:25 [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI Ozan Çağlayan
2009-06-01 17:55 ` Takashi Iwai
2009-06-01 20:05 ` Ozan Çağlayan
2009-06-01 22:57 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.