[elbe-devel] [PATCH 1/8] elbepack: imgutils: add helper to call dd

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed May 15 13:32:17 CEST 2024


Provides a convenient wrapper for dd's key=value arguments.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/imgutils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elbepack/imgutils.py b/elbepack/imgutils.py
index d2ea2b669848..4a8c5f57c151 100644
--- a/elbepack/imgutils.py
+++ b/elbepack/imgutils.py
@@ -59,3 +59,7 @@ class _Mount:
 
 
 mount = _Mount
+
+
+def dd(args, /, **kwargs):
+    do(['dd', *[f'{k}={v}' for k, v in args.items()]], **kwargs)

-- 
2.45.0



More information about the elbe-devel mailing list