0
<install-condition header-file="platform/lib_platform.h">is_bcm_soc_brd1() || is_bcm_soc_brd2() || is_bcm_soc_brd3()</install-condition>

这里我的输入板类型是is_board_jkl,所以函数is_bcm_soc_brd3()会返回True。问题是 is_bcm_soc_brd3() 和 is_bcm_soc_brd4 有一个共同的项目。

但我的要求是,如果板子是is_board_jkl,就不要再执行了。即在C代码中我可以这样写,

If ( is_bcm_soc_brd1() || is_bcm_soc_brd2() ||   (is_bcm_soc_brd3() && !is_bcm_soc_brd4())
 {
    //do the action
 }

如何在下面给定的 XML 标记中编写等效代码?

 <install-condition header-file="platform/lib_platform.h">is_bcm_soc_brd1() || is_bcm_soc_brd2() || is_bcm_soc_brd3()</install-condition>

猫平台/lib_platform.h

#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>

int is_bcm_soc_brd1()
{
  if (is_board_abc())
    return TRUE;

  return FALSE;
}

int is_bcm_soc_brd2()
{
  if (is_board_def())
    return TRUE;

  return FALSE;
}


int is_bcm_soc_brd3()
{
  if (is_board_ghi() || (is_board_jkl()))  
    return TRUE;

  return FALSE;
}

int is_bcm_soc_brd4()
{
  if (is_board_jkl())
    return TRUE;

  return FALSE;
}
4

0 回答 0