AFAICT without testing it, you should be able to directly replace
__FILE__ with KBUILD_BASENAME. Both are just pre-processor variables.
On my bells and whistles list (things to add after kbuild 2.5 is in the
kernel) is KBUILD_UNIQUE_NAME. That variable will contain enough of
the pathname to uniquely identify the source. For globally unique
names it is the same as KBUILD_BASENAME with a .[cS] suffix. For
repeated filenames like inode.c it is fs/inode.c for the top level,
ext2/inode.c for an individual filesystem.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/