Ignore:
Timestamp:
Apr 22, 2010, 7:18:13 PM (15 years ago)
Author:
Silvan Scherrer
Message:

samba client 1.6: added version to logfile

Location:
branches/client-1.6/src
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/client-1.6/src/Makefile.kmk

    r441 r445  
    129129
    130130# substitute macros in version.h
    131 version.h: Config.kmk version.h_
    132         $(SED) "s;_VERSION_;$(VERSION);g" version.h_ \
     131version.h: Config.kmk version.tpl
     132        $(SED) "s;_VERSION_;$(VERSION);g" version.tpl \
    133133                | $(SED) "s;_WPIVERSION_;$(subst .,\\\,$(VERSION));g" \
    134134                | $(SED) "s;_BUILD_;$(BUILD);g" \
  • branches/client-1.6/src/debug.c

    r441 r445  
    2929#include <sys/time.h>
    3030#include <sys/stat.h>
     31#include "version.h"
    3132
    3233int debuglevel = 9; // we set it to 9, so we get all messages
     
    3536char logfilename[] = "log.ndpsmb";
    3637BOOL do_logging = FALSE;
     38BOOL firstLogLine = TRUE;
    3739
    3840int debuglvl(int level)
     
    101103                        f = stdout;
    102104                }
     105
     106                // in the first log line we write our version of the client
     107                if (firstLogLine)
     108                {
     109                   fprintf(f, "samba client %s build %s\n", VERSION, BUILD);
     110                   firstLogLine = FALSE;
     111                }
     112
    103113                gettimeofday(&tv, NULL);
    104114                strftime(buf,sizeof(buf)-1,"%Y/%m/%d %H:%M:%S", localtime((time_t *)&tv.tv_sec));
  • branches/client-1.6/src/version.tpl

    r401 r445  
    66#define NDPSMB_BUILD    _BUILD_
    77#define NDPSMB_INSTALL  _WPIVERSION_
     8#define VERSION         "_VERSION_"
     9#define BUILD           "_BUILD_"
    810
    911#endif // __Version__H
Note: See TracChangeset for help on using the changeset viewer.