mirror of
https://github.com/fluencelabs/redis
synced 2025-06-17 03:01:20 +00:00
Introduced the Build ID in INFO and --version output.
The idea is to be able to identify a build in a unique way, so for instance after a bug report we can recognize that the build is the one of a popular Linux distribution and perform the debugging in the same environment.
This commit is contained in:
@ -31,7 +31,11 @@
|
||||
* small file is recompiled, as we access this information in all the other
|
||||
* files using this functions. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "release.h"
|
||||
#include "version.h"
|
||||
#include "crc64.h"
|
||||
|
||||
char *redisGitSHA1(void) {
|
||||
return REDIS_GIT_SHA1;
|
||||
@ -40,3 +44,9 @@ char *redisGitSHA1(void) {
|
||||
char *redisGitDirty(void) {
|
||||
return REDIS_GIT_DIRTY;
|
||||
}
|
||||
|
||||
uint64_t redisBuildId(void) {
|
||||
char *buildid = REDIS_VERSION REDIS_BUILD_ID REDIS_GIT_DIRTY REDIS_GIT_SHA1;
|
||||
|
||||
return crc64(0,(unsigned char*)buildid,strlen(buildid));
|
||||
}
|
||||
|
Reference in New Issue
Block a user