Message ID | 1495047894-26620-1-git-send-email-alex.hung@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 17/05/17 20:04, Alex Hung wrote: > Often not all sleep states are supported. For example, S1 & S2 > aren't usually supported by any systems and S3 & S4 aren't usually > supported by servers. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/method/method.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 61427ec..068aa5e 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -6383,6 +6383,11 @@ static int method_test_PTS(fwts_framework *fw) > > for (i = 1; i < 6; i++) { > ACPI_OBJECT arg[1]; > + char name[6]; > + > + snprintf(name, sizeof(name), "_S%1d_", i); > + if (fwts_acpi_object_exists(name) == NULL) > + continue; > > arg[0].Type = ACPI_TYPE_INTEGER; > arg[0].Integer.Value = i; > @@ -6457,6 +6462,12 @@ static int method_test_WAK(fwts_framework *fw) > > for (i = 1; i < 6; i++) { > ACPI_OBJECT arg[1]; > + char name[6]; > + > + snprintf(name, sizeof(name), "_S%1d_", i); > + if (fwts_acpi_object_exists(name) == NULL) > + continue; > + > arg[0].Type = ACPI_TYPE_INTEGER; > arg[0].Integer.Value = i; > fwts_log_info(fw, "Test _WAK(%d) System Wake, State S%d.", i, i); > Acked-by: Colin Ian King <colin.king@canonical.com>
On 05/18/2017 03:04 AM, Alex Hung wrote: > Often not all sleep states are supported. For example, S1 & S2 > aren't usually supported by any systems and S3 & S4 aren't usually > supported by servers. > > Signed-off-by: Alex Hung <alex.hung@canonical.com> > --- > src/acpi/method/method.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c > index 61427ec..068aa5e 100644 > --- a/src/acpi/method/method.c > +++ b/src/acpi/method/method.c > @@ -6383,6 +6383,11 @@ static int method_test_PTS(fwts_framework *fw) > > for (i = 1; i < 6; i++) { > ACPI_OBJECT arg[1]; > + char name[6]; > + > + snprintf(name, sizeof(name), "_S%1d_", i); > + if (fwts_acpi_object_exists(name) == NULL) > + continue; > > arg[0].Type = ACPI_TYPE_INTEGER; > arg[0].Integer.Value = i; > @@ -6457,6 +6462,12 @@ static int method_test_WAK(fwts_framework *fw) > > for (i = 1; i < 6; i++) { > ACPI_OBJECT arg[1]; > + char name[6]; > + > + snprintf(name, sizeof(name), "_S%1d_", i); > + if (fwts_acpi_object_exists(name) == NULL) > + continue; > + > arg[0].Type = ACPI_TYPE_INTEGER; > arg[0].Integer.Value = i; > fwts_log_info(fw, "Test _WAK(%d) System Wake, State S%d.", i, i); Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 61427ec..068aa5e 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -6383,6 +6383,11 @@ static int method_test_PTS(fwts_framework *fw) for (i = 1; i < 6; i++) { ACPI_OBJECT arg[1]; + char name[6]; + + snprintf(name, sizeof(name), "_S%1d_", i); + if (fwts_acpi_object_exists(name) == NULL) + continue; arg[0].Type = ACPI_TYPE_INTEGER; arg[0].Integer.Value = i; @@ -6457,6 +6462,12 @@ static int method_test_WAK(fwts_framework *fw) for (i = 1; i < 6; i++) { ACPI_OBJECT arg[1]; + char name[6]; + + snprintf(name, sizeof(name), "_S%1d_", i); + if (fwts_acpi_object_exists(name) == NULL) + continue; + arg[0].Type = ACPI_TYPE_INTEGER; arg[0].Integer.Value = i; fwts_log_info(fw, "Test _WAK(%d) System Wake, State S%d.", i, i);
Often not all sleep states are supported. For example, S1 & S2 aren't usually supported by any systems and S3 & S4 aren't usually supported by servers. Signed-off-by: Alex Hung <alex.hung@canonical.com> --- src/acpi/method/method.c | 11 +++++++++++ 1 file changed, 11 insertions(+)