!94 sync patches from upstream
From: @jiayi0118 Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
86accfbb68
@ -0,0 +1,42 @@
|
|||||||
|
From 5ce27d9ee552ffe24ffdc234467ae4b817b956d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chenjiayi <chenjiayi22@huawei.com>
|
||||||
|
Date: Fri, 19 Apr 2024 03:16:26 +0800
|
||||||
|
Subject: [PATCH 1/1] fix(devmaster): add device property when cmdline
|
||||||
|
parameter has no value
|
||||||
|
|
||||||
|
If cmdline parameter has no value, assign "1" to it and add property
|
||||||
|
to the device.
|
||||||
|
---
|
||||||
|
exts/devmaster/src/lib/rules/exec_mgr.rs | 13 +++++++++++--
|
||||||
|
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/exts/devmaster/src/lib/rules/exec_mgr.rs b/exts/devmaster/src/lib/rules/exec_mgr.rs
|
||||||
|
index 54e0093e..4dd15a00 100644
|
||||||
|
--- a/exts/devmaster/src/lib/rules/exec_mgr.rs
|
||||||
|
+++ b/exts/devmaster/src/lib/rules/exec_mgr.rs
|
||||||
|
@@ -908,11 +908,20 @@ impl ExecuteManager {
|
||||||
|
return Ok(token.read().unwrap().as_ref().unwrap().op == OperatorType::Nomatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
- let value = cmdline.get_param(&token_value);
|
||||||
|
+ let value = match cmdline.get_param(&token_value) {
|
||||||
|
+ Some(v) => {
|
||||||
|
+ if v.is_empty() {
|
||||||
|
+ "1".to_string()
|
||||||
|
+ } else {
|
||||||
|
+ v
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ None => "1".to_string(),
|
||||||
|
+ };
|
||||||
|
|
||||||
|
execute_err!(
|
||||||
|
token.read().unwrap().as_ref().unwrap(),
|
||||||
|
- device.add_property(&token_value, &value.unwrap_or_default())
|
||||||
|
+ device.add_property(&token_value, &value)
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok(token.read().unwrap().as_ref().unwrap().op == OperatorType::Match)
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Name: sysmaster
|
Name: sysmaster
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 6
|
Release: 7
|
||||||
Summary: redesign and reimplement process1.
|
Summary: redesign and reimplement process1.
|
||||||
|
|
||||||
License: Mulan PSL v2
|
License: Mulan PSL v2
|
||||||
@ -26,6 +26,7 @@ Patch3: backport-fix-resolve-not-mount-home.patch
|
|||||||
Patch4: backport-fix-devmaster-correct-the-database-path.patch
|
Patch4: backport-fix-devmaster-correct-the-database-path.patch
|
||||||
Patch5: backport-fix-devmaster-fix-incorrect-cmdline-parameter-value-.patch
|
Patch5: backport-fix-devmaster-fix-incorrect-cmdline-parameter-value-.patch
|
||||||
Patch6: backport-fix-devmaster-supply-log-messages-on-loading-.link-c.patch
|
Patch6: backport-fix-devmaster-supply-log-messages-on-loading-.link-c.patch
|
||||||
|
Patch7: backport-fix-devmaster-add-device-property-when-cmdline-param.patch
|
||||||
|
|
||||||
ExclusiveArch: x86_64 aarch64
|
ExclusiveArch: x86_64 aarch64
|
||||||
|
|
||||||
@ -167,6 +168,9 @@ if [ $1 -eq 0 ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 23 2024 chenjiayi<chenjiayi22@huawei.com> - 1.0.0-7
|
||||||
|
- sync patches from upstream
|
||||||
|
|
||||||
* Thu Apr 18 2024 chenjiayi<chenjiayi22@huawei.com> - 1.0.0-6
|
* Thu Apr 18 2024 chenjiayi<chenjiayi22@huawei.com> - 1.0.0-6
|
||||||
- sync patches from upstream
|
- sync patches from upstream
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user