Commit 6d73f482 authored by Cedric Roux's avatar Cedric Roux

integration fix: change the way to print the version

Using "system" to call "git log" is too error-prone.
In the test setup, lte-softmodem was blocked because
"git log" uses a pager ("less") and the pager was
waiting for the user to press enter.

We could pass "--no-pager" to "git log" but then
what if someone runs the softmodem out of the source
tree?

cmake defines PACKAGE_VERSION, we can use that instead,
as is done in openair-cn.
parent 9f142828
...@@ -1388,11 +1388,6 @@ int main( int argc, char **argv ) { ...@@ -1388,11 +1388,6 @@ int main( int argc, char **argv ) {
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs); memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
char command_line[500];
sprintf(command_line,"git log -1");
if (background_system(command_line) != 0)
printf("ERROR failed command '%s'", command_line);
set_latency_target(); set_latency_target();
// set default parameters // set default parameters
...@@ -1524,6 +1519,12 @@ int main( int argc, char **argv ) { ...@@ -1524,6 +1519,12 @@ int main( int argc, char **argv ) {
check_clock(); check_clock();
#ifndef PACKAGE_VERSION
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
#endif
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
// init the parameters // init the parameters
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment