mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed unclosed file
This commit is contained in:
parent
277589029e
commit
5ffb16ec8f
1 changed files with 5 additions and 6 deletions
11
lib/kernel.c
11
lib/kernel.c
|
@ -29,13 +29,12 @@ int kernel_module_set_param(const char *module, const char *param, const char *v
|
|||
|
||||
snprintf(fn, sizeof(fn), "%s/module/%s/parameters/%s", SYSFS_PATH, module, param);
|
||||
f = fopen(fn, "w");
|
||||
if (f) {
|
||||
debug(DBG_SOCKET | 5, "Set parameter %s of kernel module %s to %s", module, param, value);
|
||||
fprintf(f, "%s", value);
|
||||
fclose(f);
|
||||
}
|
||||
else
|
||||
if (!f)
|
||||
serror("Failed set parameter %s for kernel module %s to %s", module, param, value);
|
||||
|
||||
debug(5, "Set parameter %s of kernel module %s to %s", module, param, value);
|
||||
fprintf(f, "%s", value);
|
||||
fclose(f);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue