Make Mtce system mode scan case in-sensitive

Mtce is looking for 'Standard' in system_type and will
default to AIO if the 'S' in 'standard' is not uppercase.

This update makes the mtce system_type driver handle
system_type and system_mode readings case in-sensitive.

Tested on-system case variations for both type and mode
in platform.conf.

Closes-Bug: 1827904
Change-Id: I5e33097e1b13e5b5d385929dd13e7912ae89ead8
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2019-05-06 13:06:31 -04:00
parent 308ba12776
commit b13750d5f0
4 changed files with 9 additions and 6 deletions

View File

@ -1472,7 +1472,7 @@ unsigned short checksum(void *b, int len)
}
std::string tolowercase ( const std::string & in )
std::string tolowercase ( const std::string in )
{
std::string out;

View File

@ -2,7 +2,7 @@
#define __INCLUDE_NODEUTIL_H__
/*
* Copyright (c) 2013-2014, 2016 Wind River Systems, Inc.
* Copyright (c) 2013-2014, 2016, 2019 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
@ -104,7 +104,7 @@ string lltos (long long unsigned int val );
string ftos ( float val, int resolution );
unsigned short checksum(void *b, int len);
std::string tolowercase ( const std::string & in );
std::string tolowercase ( const std::string in );
int get_delimited_list ( string str , char delimiter, list<string> & the_list, bool remove_whitespace );

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2016 Wind River Systems, Inc.
* Copyright (c) 2013-2019 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
@ -32,6 +32,7 @@ using namespace std;
#include "daemon_common.h"
#include "daemon_option.h"
#include "nodeBase.h"
#include "nodeUtil.h"
/* GNU Extension
* program_invocation_name contains the name that was used to invoke the
@ -365,7 +366,8 @@ system_type_enum daemon_system_type ( void )
if ( sscanf ( &buffer[0], "system_type=%1023s", &type_str[0] ) == 1 )
{
string type_string = type_str ;
if ( !type_string.empty() && ( type_string == "Standard"))
type_string = tolowercase(type_string);
if ( !type_string.empty() && ( type_string == "standard"))
{
system_type = SYSTEM_TYPE__NORMAL ;
}
@ -400,6 +402,7 @@ system_type_enum daemon_system_type ( void )
if ( sscanf ( &buffer[0], "system_mode=%1023s", &mode_str[0] ) == 1 )
{
string mode = mode_str ;
mode = tolowercase(mode);
if ( !mode.empty() )
{
if ( mode.compare("duplex") == 0 )

View File

@ -1,3 +1,3 @@
SRC_DIR="src"
TIS_PATCH_VER=149
TIS_PATCH_VER=150
BUILD_IS_SLOW=5