mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
drbd: split off drbd_buildtag into separate file
To be more similar to what we do in the out-of-tree module and ease the upstreaming process. Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Reviewed-by: Joel Colledge <joel.colledge@linbit.com> Link: https://lore.kernel.org/r/20230113123506.144082-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
a3df2e456c
commit
887b98c74f
@ -1,5 +1,5 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
drbd-y := drbd_bitmap.o drbd_proc.o
|
drbd-y := drbd_buildtag.o drbd_bitmap.o drbd_proc.o
|
||||||
drbd-y += drbd_worker.o drbd_receiver.o drbd_req.o drbd_actlog.o
|
drbd-y += drbd_worker.o drbd_receiver.o drbd_req.o drbd_actlog.o
|
||||||
drbd-y += drbd_main.o drbd_strings.o drbd_nl.o
|
drbd-y += drbd_main.o drbd_strings.o drbd_nl.o
|
||||||
drbd-y += drbd_interval.o drbd_state.o
|
drbd-y += drbd_interval.o drbd_state.o
|
||||||
|
22
drivers/block/drbd/drbd_buildtag.c
Normal file
22
drivers/block/drbd/drbd_buildtag.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#include <linux/drbd.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
const char *drbd_buildtag(void)
|
||||||
|
{
|
||||||
|
/* DRBD built from external sources has here a reference to the
|
||||||
|
* git hash of the source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static char buildtag[38] = "\0uilt-in";
|
||||||
|
|
||||||
|
if (buildtag[0] == 0) {
|
||||||
|
#ifdef MODULE
|
||||||
|
sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
|
||||||
|
#else
|
||||||
|
buildtag[0] = 'b';
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return buildtag;
|
||||||
|
}
|
@ -3776,24 +3776,6 @@ _drbd_insert_fault(struct drbd_device *device, unsigned int type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *drbd_buildtag(void)
|
|
||||||
{
|
|
||||||
/* DRBD built from external sources has here a reference to the
|
|
||||||
git hash of the source code. */
|
|
||||||
|
|
||||||
static char buildtag[38] = "\0uilt-in";
|
|
||||||
|
|
||||||
if (buildtag[0] == 0) {
|
|
||||||
#ifdef MODULE
|
|
||||||
sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
|
|
||||||
#else
|
|
||||||
buildtag[0] = 'b';
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
return buildtag;
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(drbd_init)
|
module_init(drbd_init)
|
||||||
module_exit(drbd_cleanup)
|
module_exit(drbd_cleanup)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user