mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix the handling of of the kernel change from "quiet" to "low-power"
A coming kernel change will convert "quiet" to "low-power" due to how platform_profile can now have multiple registered handlers. (kernel 6.14 est) Fixes #609
This commit is contained in:
@@ -154,6 +154,18 @@ macro_rules! get_attr_string {
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! get_attr_string_array {
|
||||
($(#[$attr:meta])* $attr_name:literal $item:ident) => {
|
||||
concat_idents::concat_idents!(fn_name = get_, $attr_name {
|
||||
$(#[$attr])*
|
||||
pub fn fn_name(&self) -> Result<Vec<PlatformProfile>> {
|
||||
$crate::read_attr_string_array(&to_device(&self.$item)?, $attr_name)
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! set_attr_string {
|
||||
($(#[$attr:meta])* $attr_name:literal $item:ident) => {
|
||||
@@ -175,3 +187,12 @@ macro_rules! attr_string {
|
||||
$crate::watch_attr!($attr_name $item);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! attr_string_array {
|
||||
($(#[$attr:meta])* $attr_name:literal, $item:ident) => {
|
||||
$crate::has_attr!($attr_name $item);
|
||||
$crate::get_attr_string_array!($attr_name $item);
|
||||
$crate::watch_attr!($attr_name $item);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user