Commit ca97655f authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

CPUAffinity: do not stop if writing to netdev_set_queue_rps_cpus.c fails

parent 21cab455
...@@ -331,14 +331,18 @@ string CPUAffinity::getNetDevSetterSudoDesc() ...@@ -331,14 +331,18 @@ string CPUAffinity::getNetDevSetterSudoDesc()
string dir = "/tmp"; string dir = "/tmp";
string fname = dir + "/" + setter_name + ".c"; string fname = dir + "/" + setter_name + ".c";
ofstream src_file(fname.c_str()); ofstream src_file(fname.c_str());
const StringList& SrcList = NetDevSetQueueRpsSrc; if (src_file) {
StringList::const_iterator it, end = SrcList.end(); const StringList& SrcList = NetDevSetQueueRpsSrc;
for (it = SrcList.begin(); src_file && (it != end); ++it) StringList::const_iterator it, end = SrcList.end();
src_file << *it << endl; for (it = SrcList.begin(); src_file && (it != end); ++it)
if (src_file) src_file << *it << endl;
src_file.close(); if (src_file)
if (!src_file) src_file.close();
THROW_HW_ERROR(Error) << "Error writing to " << fname; if (!src_file)
DEB_WARNING() << "Error writing to " << fname;
} else {
DEB_WARNING() << "Error creating " << fname;
}
ostringstream desc; ostringstream desc;
string aux_setter = dir + "/" + setter_name; string aux_setter = dir + "/" + setter_name;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment