Files
src/lib/libc/gen/exterr_cat_filenames.h
T
Jim Huang Chen db887713de kldload: Improve error handling
Address a failure in linker_load_module (sys/kern/kern_linker.c) to
verify that an already-loaded module matches the version requirement,
which caused the method to return the error (EEXIST).  This was then
propagated back up to kldload, which incorrectly printed that the module
had already been loaded.

Add a lookup to modlist_lookup2 to distinguish between the two cases:
- A module is already loaded that is of the correct version, so the
  error EEXIST should be returned
- An already-loaded module is of the incorrect version, so the error
  ENOEXEC is returned (changed from ENOENT)

Reviewed by:	imp, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57002
2026-06-14 19:45:50 -04:00

23 lines
898 B
C

/*
* Automatically @generated, use
* tools/build/make_libc_exterr_cat_filenames.sh
*/
[EXTERR_CAT_HWPMC_IBS] = "dev/hwpmc/hwpmc_ibs.c",
[EXTERR_CAT_VMM] = "dev/vmm/vmm_dev.c",
[EXTERR_CAT_FUSE_DEVICE] = "fs/fuse/fuse_device.c",
[EXTERR_CAT_FUSE_VFS] = "fs/fuse/fuse_vfsops.c",
[EXTERR_CAT_FUSE_VNOPS] = "fs/fuse/fuse_vnops.c",
[EXTERR_CAT_GEOM] = "geom/geom_subr.c",
[EXTERR_CAT_GEOMVFS] = "geom/geom_vfs.c",
[EXTERR_CAT_FILEDESC] = "kern/kern_descrip.c",
[EXTERR_CAT_PROCEXIT] = "kern/kern_exit.c",
[EXTERR_CAT_FORK] = "kern/kern_fork.c",
[EXTERR_CAT_LINKER] = "kern/kern_linker.c",
[EXTERR_CAT_GENIO] = "kern/sys_generic.c",
[EXTERR_CAT_VFSBIO] = "kern/vfs_bio.c",
[EXTERR_CAT_INOTIFY] = "kern/vfs_inotify.c",
[EXTERR_CAT_VFSSYSCALL] = "kern/vfs_syscalls.c",
[EXTERR_CAT_BRIDGE] = "net/if_bridge.c",
[EXTERR_CAT_SWAP] = "vm/swap_pager.c",
[EXTERR_CAT_MMAP] = "vm/vm_mmap.c",