On 06/04/2016 11:47 AM, Thiago Macieira wrote:
On quarta-feira, 6 de abril de 2016 10:47:39 PDT Duane wrote:
This works in the sense that it returns 0 when there's no error but it
doesn't seem to return the return value from insmod. For example,
insmod returns 4531 when the file is already loaded but
QProcess::exitCode is 17. I can rmmod module I guess.
The error code cannot be 4531. There aren't enough bits in the kernel
structure that returns status codes.
/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
4352. Sorry typo.
Using this call:
int res = std::system("/sbin/insmod /mnt/sdb1/uio_netx.ko");
Anyway, I don't really need to do this. I use this to load a Profibus
mini pci module. When the module isn't loaded I get a failure trying to
initialize the "board" that's more explicit.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest