summaryrefslogtreecommitdiffstats
path: root/src/live/parttypes.py
Commit message (Collapse)AuthorAgeFilesLines
* live: parttypes: add EFI partition type in MBR partition schemeOpenGnSys Support Team2024-05-141-0/+1
| | | | Add 0xef partition type for EFI in MBR.
* live: add fat32 to get_parttype()OpenGnSys Support Team2024-04-231-0/+2
| | | | | | Use "Microsoft basic data partition" to store FAT32 in case of GPT partition scheme and 0xB according in case of MBR partition scheme according to documentation.
* src: log backtrace in unhandled error casesAlejandro Sirgo Rica2024-04-031-4/+5
| | | | | | | | | | | | | | | | | | | Log an error message in known error cases and log a backtrace otherwise. Define a new error type OgError to be used in all the 'raise' blocks to define the error message to log. The exception propagates until it reaches send_internal_server_error() where the exception type is checked. If the type is OgError we log the exception message. Logs the backtrace for other types. The initial error implementation printed a backtrace everytime an error ocurred. The next iteration changed it to only print a backtrace in a very particular case but ended up omiting too much information such as syntax errors or unknown error context. The actual implementation only logs the cases we already cover in the codebase and logs a bracktrace in the others, enabling a better debugging experience.
* src: make exception messages more contextual and explicitAlejandro Sirgo Rica2024-03-211-1/+1
| | | | | | | Provide more information in exception messages as those are the source of the logging messages. Add information about paths, files or configuration related to the operation associated to the exception.
* live: add linux swap parttypeJose M. Guisado2023-03-231-10/+12
| | | | | | | Adds linux swap partition type, mapped to the 'LINUX-SWAP' string in web interfaces like ogCP or webconsole. Fixes: 29c53e54e945 ("live: add parttypes.py")
* live: add parttypes.pyJose M. Guisado2023-02-081-0/+55
Adds parttypes.py module with utility functions to get partition types (parttypes) from python-libfdisk. Supports standard partition types, either DOS or GPT. DOS labels use a hex code to define partition types, python-libfdisk exposes get_parttype_from_code to look up for DOS partition types from a given hexcode. GPT label uses a string (UUID) for each supported partition type, python-libfdisk exposes get_parttype_from_string to look up for GPT partition types from a given string.