From 409657d9a1b5122d5e367bff127b66cfbd3a2d47 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sun, 19 Apr 2020 12:19:00 +0200 Subject: Improved the documentation for the Android boot image Python bindings. --- plugins/bootimg/python/format.c | 3 ++- plugins/bootimg/python/module.c | 11 ++++++++++- 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, -- cgit v0.11.2-87-g4458