<div dir="ltr">Hi, <div><br></div><div>I am getting an error while unloading modules via modprobe. Here is the description of issue.</div><div><br></div><div>I have a module 'A' that depends on Module 'C' and 'D'.</div>
<div>And another module 'B' that depends on Module 'C' and 'E'</div><div><br></div><div>I loaded these modules from code via 'system' function as</div><div><br></div><div>error = system("modprobe -v A");</div>
<div>error = system("modprobe -v B");<br></div><div><br></div><div>After this all my modules A, B, C, D, and E are loaded properly.</div><div><br></div><div>Now when i tried to unload module A via </div><div><br>
</div><div>error = system("modprobe -rv A");</div><div><br></div><div>This returns an error = 256.</div><div><br></div><div>But my module A and D is unloaded successfully. 'C' is not unloaded as it is still in used by 'B'.</div>
<div>Is the error returned by system function is caused due to not unloading of module 'C'? This is a valid scenario and error should not have returned in this case.</div><div><br></div><div>I am still trying to find the reason for an error. If anyone has some information on this then please help to share.</div>
<div><br></div><div>Thanks,</div><div>Chetan Nanda </div></div>