git: 2352336ad9b2 - main - geom_flashmap: Rename the kernel module

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 29 Oct 2024 15:50:08 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=2352336ad9b26fd21d9b0013e195e41d6d02b914

commit 2352336ad9b26fd21d9b0013e195e41d6d02b914
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-10-29 15:11:12 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-29 15:11:12 +0000

    geom_flashmap: Rename the kernel module
    
    Absent a linker.hints, if a module dependency exists on disk, the loader
    will automatically load it.  That is, if something depends on module
    foo, and foo.ko exists, we'll load foo.ko even though the linker hints
    file is missing.  It's a bit of a hack but it's handy.
    
    This breaks with geom_flashmap though, since it's geom_flashmap.ko on
    disk but the module is called g_flashmap.  However, pretty much every
    other GEOM module is given a "geom_" prefix, so for consistency's sake
    alone, it seems nice to rename the module.
    
    PR:             274388
    Reviewed by:    jhb
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D47311
---
 sys/dev/fdt/fdt_slicer.c | 2 +-
 sys/dev/mmc/mmcsd.c      | 2 +-
 sys/geom/geom_flashmap.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/fdt/fdt_slicer.c b/sys/dev/fdt/fdt_slicer.c
index 92aa0af90542..5c1d11cfdcf5 100644
--- a/sys/dev/fdt/fdt_slicer.c
+++ b/sys/dev/fdt/fdt_slicer.c
@@ -179,5 +179,5 @@ static moduledata_t fdt_slicer_mod = {
 };
 
 DECLARE_MODULE(fdt_slicer, fdt_slicer_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD);
-MODULE_DEPEND(fdt_slicer, g_flashmap, 0, 0, 0);
+MODULE_DEPEND(fdt_slicer, geom_flashmap, 0, 0, 0);
 MODULE_VERSION(fdt_slicer, 1);
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c
index cd973e53802c..5b9cb93c7b31 100644
--- a/sys/dev/mmc/mmcsd.c
+++ b/sys/dev/mmc/mmcsd.c
@@ -1563,5 +1563,5 @@ mmcsd_handler(module_t mod __unused, int what, void *arg __unused)
 }
 
 DRIVER_MODULE(mmcsd, mmc, mmcsd_driver, mmcsd_handler, NULL);
-MODULE_DEPEND(mmcsd, g_flashmap, 0, 0, 0);
+MODULE_DEPEND(mmcsd, geom_flashmap, 0, 0, 0);
 MMC_DEPEND(mmcsd);
diff --git a/sys/geom/geom_flashmap.c b/sys/geom/geom_flashmap.c
index cef488d8b9b7..37fc7a36ecff 100644
--- a/sys/geom/geom_flashmap.c
+++ b/sys/geom/geom_flashmap.c
@@ -222,4 +222,4 @@ static struct g_class g_flashmap_class = {
 };
 
 DECLARE_GEOM_CLASS(g_flashmap_class, g_flashmap);
-MODULE_VERSION(g_flashmap, 0);
+MODULE_VERSION(geom_flashmap, 0);