I want to find the return value of the mount command which is passed into the system function using the C language. How can I do this?
For example:
printf("return val = %d",WEXITSTATUS(system(mount /dev/sda /media/mmcblk0)));But every time it gives me 255 as the value.
How can I find return code fired by my mount commandor any other solution?
NOTE: I have included header files properly