1// SPDX-License-Identifier: GPL-2.0-only
2#include <linux/drbd_config.h>
3#include <linux/module.h>
4
5const char *drbd_buildtag(void)
6{
7	/* DRBD built from external sources has here a reference to the
8	 * git hash of the source code.
9	 */
10
11	static char buildtag[38] = "\0uilt-in";
12
13	if (buildtag[0] == 0) {
14#ifdef MODULE
15		sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion);
16#else
17		buildtag[0] = 'b';
18#endif
19	}
20
21	return buildtag;
22}
23