I am trying to unmount a usb-storage device through a c++ code as follows.
while(umount("/dev/sdc1/")!=0)
{
std::cout << "ERROR: " << strerror(errno) << std::endl;
std::this_thread::sleep_for (std::chrono::seconds(2));
}
But, I get an error saying: Invalid argument. What am I doing wrong?
Thanks in advance!