[PATCH] bios: hdaaudio: skip the test if no BIOS pin config found (LP: #1201903)
Colin King
colin.king at canonical.com
Tue Jul 16 17:39:04 UTC 2013
From: Colin Ian King <colin.king at canonical.com>
We should print out a message and skip the test rather than silently
do nothing if no BIOS audio pin configs are found.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/bios/hdaaudio/hdaaudio.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/bios/hdaaudio/hdaaudio.c b/src/bios/hdaaudio/hdaaudio.c
index ad482b6..6d47228 100644
--- a/src/bios/hdaaudio/hdaaudio.c
+++ b/src/bios/hdaaudio/hdaaudio.c
@@ -150,6 +150,7 @@ static int hda_audio_test1(fwts_framework *fw)
{
DIR *dir;
struct dirent *directory;
+ bool checked = false;
if ((dir = opendir("/sys/class/sound/")) == NULL)
return FWTS_ERROR;
@@ -157,6 +158,8 @@ static int hda_audio_test1(fwts_framework *fw)
while ((directory = readdir(dir)) != NULL)
if (strncmp(directory->d_name, "hw", 2) == 0) {
char path[PATH_MAX];
+
+ checked = true;
snprintf(path, sizeof(path), "/sys/class/sound/%s",
directory->d_name);
fwts_log_info(fw, "Checking '%s':", directory->d_name);
@@ -166,6 +169,9 @@ static int hda_audio_test1(fwts_framework *fw)
closedir(dir);
+ if (!checked)
+ fwts_skipped(fw, "Cannot find any BIOS set audio pin configurations.");
+
return FWTS_OK;
}
--
1.8.1.2
More information about the fwts-devel
mailing list