Skip to content

Commit

Permalink
core: remove HOST_OS, always use DISTVER instead
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed May 25, 2020
1 parent fc7a7f3 commit 61227bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/dird/ua_cmds.cc
Expand Up @@ -2813,7 +2813,7 @@ static bool VersionCmd(UaContext* ua, const char* cmd)
ua->send->ObjectKeyValue("Version", "%s: ", kBareosVersionStrings.Full,
"%s ");
ua->send->ObjectKeyValue("bdate", kBareosVersionStrings.Date, "(%s) ");
ua->send->ObjectKeyValue("operatingsystem", HOST_OS, "%s ");
ua->send->ObjectKeyValue("operatingsystem", DISTVER, "%s ");
ua->send->ObjectKeyValue("distname", PLATFORM, "%s ");
ua->send->ObjectKeyValue("distversion", DISTVER, "%s ");
ua->send->ObjectKeyValue("CustomVersionId", NPRTB(me->verid), "%s\n");
Expand Down
8 changes: 4 additions & 4 deletions core/src/filed/dir_cmd.cc
Expand Up @@ -245,7 +245,8 @@ static char OKsecureerase[] = "2000 OK FDSecureEraseCmd %s\n";
static char OKsession[] = "2000 OK session\n";
static char OKstore[] = "2000 OK storage\n";
static char OKstoreend[] = "2000 OK storage end\n";
static char OKjob[] = "2000 OK Job %s (%s) %s,%s,%s";
static char OKjob[] =
"2000 OK Job %s (%s) %s,%s";
static char OKsetdebugv0[] =
"2000 OK setdebug=%d trace=%d hangup=%d tracefile=%s\n";
static char OKsetdebugv1[] =
Expand Down Expand Up @@ -998,15 +999,14 @@ static bool job_cmd(JobControlRecord* jcr)
#ifdef HAVE_WIN32
os_version = win_os;
#else
os_version = HOST_OS;
os_version = DISTVER;
#endif
/*
* the director will treat any text after the "2000 OK Job" as the client's
* uname and will update the client's catalog record with that value.
*/
return dir->fsend(OKjob, kBareosVersionStrings.Full,
kBareosVersionStrings.ShortDate, os_version, PLATFORM,
DISTVER);
kBareosVersionStrings.ShortDate, os_version, PLATFORM);
}

static bool RunbeforeCmd(JobControlRecord* jcr)
Expand Down
3 changes: 0 additions & 3 deletions core/src/include/config.h.in
Expand Up @@ -35,7 +35,6 @@
# if defined(HAVE_MINGW)
# include "mingwconfig.h"
extern char win_os[];
# define HOST_OS "Linux"
# define PLATFORM "Cross-compile"
# if defined(_WIN64)
# define DISTVER "Win64"
Expand All @@ -46,7 +45,6 @@ extern char win_os[];
# include "winconfig.h"
extern char WIN_VERSION_LONG[];
extern char WIN_VERSION[];
# define HOST_OS WIN_VERSION_LONG
# define PLATFORM "MVS"
# define DISTVER WIN_VERSION
# endif
Expand Down Expand Up @@ -582,7 +580,6 @@ extern char WIN_VERSION[];
// Directory for daemon files
#cmakedefine PATH_BAREOS_WORKINGDIR @PATH_BAREOS_WORKINGDIR@

#define HOST_OS "@host@@post_host@"
#define PLATFORM "@PLATFORM@"
#define DISTVER "@DISTVER@"

Expand Down

0 comments on commit 61227bb

Please sign in to comment.