mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-24 11:03:49 +08:00
Warning if FAKE_EC_NAME is not set.
This commit is contained in:
@@ -437,11 +437,20 @@ ec_master_t *ecrt_request_master(
|
||||
|
||||
static const char *getName()
|
||||
{
|
||||
static const char *default_name = "FakeEtherCAT";
|
||||
|
||||
if (const auto ans = getenv("FAKE_EC_NAME"))
|
||||
{
|
||||
return ans;
|
||||
}
|
||||
return "FakeEtherCAT";
|
||||
|
||||
std::cerr
|
||||
<< "\nThe environment variable \"FAKE_EC_NAME\" is not set.\n"
|
||||
<< "Using the default value \"" << default_name << "\".\n"
|
||||
<< "Please consider to set unique names when using multiple"
|
||||
<< " instances.\n\n";
|
||||
|
||||
return default_name;
|
||||
}
|
||||
|
||||
static int mkpath(const std::string &file_path)
|
||||
|
||||
Reference in New Issue
Block a user