summaryrefslogtreecommitdiff
path: root/disk/part.c
diff options
context:
space:
mode:
authorJavier Tia <[email protected]>2025-10-09 07:17:46 -0600
committerIlias Apalodimas <[email protected]>2025-10-14 10:29:30 +0300
commit28c341ca07169ac8caf9895667938d74bc0119ae (patch)
treec18f92d212226888f6b255c2cf114ca5e5e0e514 /disk/part.c
parent4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff)
part: Export part_driver_lookup_type for external use
Make part_driver_lookup_type non-static so it can be used outside part.c. This allows external callers to determine the appropriate partition driver for a block device, enabling more flexible handling of partition types. Add a prototype and kernel-doc comment in part.h to document the function contract. Provide a stub inline implementation returning NULL when partition support is disabled, ensuring build consistency across configurations. Signed-off-by: Javier Tia <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'disk/part.c')
-rw-r--r--disk/part.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/disk/part.c b/disk/part.c
index 66e2b3a7219..be2b45d5a29 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -47,23 +47,7 @@ static struct part_driver *part_driver_get_type(int part_type)
return NULL;
}
-/**
- * part_driver_lookup_type() - Look up the partition driver for a blk device
- *
- * If @desc->part_type is PART_TYPE_UNKNOWN, this checks each parition driver
- * against the blk device to see if there is a valid partition table acceptable
- * to that driver.
- *
- * If @desc->part_type is already set, it just returns the driver for that
- * type, without testing if the driver can find a valid partition on the
- * descriptor.
- *
- * On success it updates @desc->part_type if set to PART_TYPE_UNKNOWN on entry
- *
- * @dev_desc: Device descriptor
- * Return: Driver found, or NULL if none
- */
-static struct part_driver *part_driver_lookup_type(struct blk_desc *desc)
+struct part_driver *part_driver_lookup_type(struct blk_desc *desc)
{
struct part_driver *drv =
ll_entry_start(struct part_driver, part_driver);