| 533 | |
| 534 | |
| 535 | Try<Nothing> unmount(const string& target, int flags) |
| 536 | { |
| 537 | // The prototype of function 'umount2' on Linux is as follows: |
| 538 | // int umount2(const char *target, int flags); |
| 539 | if (::umount2(target.c_str(), flags) < 0) { |
| 540 | return ErrnoError("Failed to unmount '" + target + "'"); |
| 541 | } |
| 542 | |
| 543 | return Nothing(); |
| 544 | } |
| 545 | |
| 546 | |
| 547 | Try<Nothing> unmountAll(const string& target, int flags) |