summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-04-19 10:19:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-04-19 10:19:00 (GMT)
commit409657d9a1b5122d5e367bff127b66cfbd3a2d47 (patch)
treed8a9493e012e1333379ec1f0bc3d434aa183d1c1
parentc8092365591d1336c1e03cf42b6bd6ea58a17350 (diff)
Improved the documentation for the Android boot image Python bindings.
-rw-r--r--plugins/bootimg/python/format.c3
-rw-r--r--plugins/bootimg/python/module.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/plugins/bootimg/python/format.c b/plugins/bootimg/python/format.c
index bf0cf6d..a5dd3bc 100644
--- a/plugins/bootimg/python/format.c
+++ b/plugins/bootimg/python/format.c
@@ -81,7 +81,8 @@ static PyObject *py_bootimg_format_new(PyTypeObject *type, PyObject *args, PyObj
"\n" \
" BootImgFormat(content)" \
"\n" \
- "Where content is the binary content of a file usually named 'boot.img'."
+ "Where content is the binary content of a file usually named 'boot.img'," \
+ " provided as a pychrysalide.analysis.BinContent instance."
ret = PyArg_ParseTuple(args, "O&", convert_to_binary_content, &content);
if (!ret) return NULL;
diff --git a/plugins/bootimg/python/module.c b/plugins/bootimg/python/module.c
index ee36ecf..db44d14 100644
--- a/plugins/bootimg/python/module.c
+++ b/plugins/bootimg/python/module.c
@@ -54,12 +54,21 @@ bool add_format_bootimg_module_to_python_module(void)
PyObject *super; /* Module à compléter */
PyObject *module; /* Sous-module mis en place */
+#define BOOTIMG_MODULE_DOC \
+ "The boot image is part of the Android boot process.\n" \
+ "\n" \
+ "It mostly contains the Linux kernel and the early startup tools," \
+ " and the recovery helpers as well.\n" \
+ "\n" \
+ "Its whole content is documented at:" \
+ " https://source.android.com/devices/bootloader/boot-image-header"
+
static PyModuleDef py_chrysalide_bootimg_module = {
.m_base = PyModuleDef_HEAD_INIT,
.m_name = "pychrysalide.format.bootimg",
- .m_doc = "Python module for Chrysalide.format.bootimg",
+ .m_doc = BOOTIMG_MODULE_DOC,
.m_size = -1,