Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1895cee authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Abhishek Pandit-Subedi
Browse files

Add TARGET_FLOSS define

OS_GENERIC is used for host tests and Linux builds but it unfortunately
puts everything at the current working directory. Add a TARGET_FLOSS
define so that we can put them at absolute locations (i.e.
/etc/bluetooth).

Bug: 186442862
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I1c9aaacd1b36b80523437b050d2232b7e5bba47c
parent 74cb2872
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ config("target_defaults") {
    "HAS_NO_BDROID_BUILDCFG",
    "OS_GENERIC",
    "OS_LINUX_GENERIC",
    "TARGET_FLOSS",
    "USE_LINUX_HCI_SOCKET",
    "EXPORT_SYMBOL=__attribute__((visibility(\"default\")))",
    "FALLTHROUGH_INTENDED=[[clang::fallthrough]]",
  ]
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static void bt_jni_msg_ready(void* context);

#ifndef BTE_DID_CONF_FILE
// TODO(armansito): Find a better way than searching by a hardcoded path.
#if defined(OS_GENERIC)
#if defined(OS_GENERIC) && !defined(TARGET_FLOSS)
#define BTE_DID_CONF_FILE "bt_did.conf"
#else  // !defined(OS_GENERIC)
#define BTE_DID_CONF_FILE "/etc/bluetooth/bt_did.conf"
+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ std::string ParameterProvider::ConfigFilePath() {
      return config_file_path;
    }
  }
  return "/etc/systembt/bt_config.conf";
  return "/etc/bluetooth/bt_config.conf";
}

void ParameterProvider::OverrideConfigFilePath(const std::string& path) {
@@ -58,7 +58,7 @@ std::string ParameterProvider::SnoopLogFilePath() {
    }
  }

  return "/etc/systembt/btsnoop_hci.log";
  return "/etc/bluetooth/btsnoop_hci.log";
}

void ParameterProvider::OverrideSnoopLogFilePath(const std::string& path) {
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ static std::unique_ptr<config_t> config;

static future_t* init() {
// TODO(armansito): Find a better way than searching by a hardcoded path.
#if defined(OS_GENERIC)
#if defined(OS_GENERIC) && !defined(TARGET_FLOSS)
  const char* path = "bt_stack.conf";
#else  // !defined(OS_GENERIC)
  const char* path = "/etc/bluetooth/bt_stack.conf";