From: Kern Sibbald Date: Sat, 5 Mar 2011 20:47:41 +0000 (+0100) Subject: Get full Windows Version display string X-Git-Tag: Release-7.0.0~993 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ded2fab08061048af3bcf90c5696b6833234c766;p=bacula%2Fbacula Get full Windows Version display string --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 3071af4e33..69eb367279 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -543,7 +543,11 @@ static int job_cmd(JCR *jcr) Mmsg(jcr->errmsg, "JobId=%d Job=%s", jcr->JobId, jcr->Job); new_plugins(jcr); /* instantiate plugins for this jcr */ generate_plugin_event(jcr, bEventJobStart, (void *)jcr->errmsg); +#ifdef HAVE_WIN32 + return dir->fsend(OKjob, VERSION, LSMDATE, win_os, DISTNAME, DISTVER); +#else return dir->fsend(OKjob, VERSION, LSMDATE, HOST_OS, DISTNAME, DISTVER); +#endif } static int runbefore_cmd(JCR *jcr) diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index 3f10fd49da..e29dd5d5e4 100644 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2010 Free Software Foundation Europe e.V. + Copyright (C) 2001-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -38,6 +38,9 @@ extern void *start_heap; +extern bool GetWindowsVersionString(char *buf, int maxsiz); + + /* Forward referenced functions */ static void list_terminated_jobs(STATUS_PKT *sp); static void list_running_jobs(STATUS_PKT *sp); @@ -87,6 +90,11 @@ static void list_status_header(STATUS_PKT *sp) dt, num_jobs_run, job_count()); sendit(msg.c_str(), len, sp); #if defined(HAVE_WIN32) + char buf[300]; + if (GetWindowsVersionString(buf, sizeof(buf))) { + len = Mmsg(msg, "%s\n", buf); + sendit(msg.c_str(), len, sp); + } if (debug_level > 0) { if (!privs) { privs = enable_backup_privileges(NULL, 1);