Enable property expansion for insmod
Useful for dynamic kernel module location. This permits to use init rule like: insmod ${persist.modules.location}/<module_name> Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9 Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
This commit is contained in:
parent
9c9280d863
commit
ac41230cbc
|
@ -58,7 +58,16 @@ extern "C" int init_module(void *, unsigned long, const char *);
|
|||
static int insmod(const char *filename, char *options)
|
||||
{
|
||||
std::string module;
|
||||
if (!read_file(filename, &module)) {
|
||||
char filename_val[PROP_VALUE_MAX];
|
||||
int ret;
|
||||
|
||||
ret = expand_props(filename_val, filename, sizeof(filename_val));
|
||||
if (ret) {
|
||||
ERROR("insmod: cannot expand '%s'\n", filename);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!read_file(filename_val, &module)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue