| 406 | |
| 407 | |
| 408 | bool MountTable::Entry::hasOption(const string& option) const |
| 409 | { |
| 410 | struct mntent mntent; |
| 411 | mntent.mnt_fsname = const_cast<char*>(fsname.c_str()); |
| 412 | mntent.mnt_dir = const_cast<char*>(dir.c_str()); |
| 413 | mntent.mnt_type = const_cast<char*>(type.c_str()); |
| 414 | mntent.mnt_opts = const_cast<char*>(opts.c_str()); |
| 415 | mntent.mnt_freq = freq; |
| 416 | mntent.mnt_passno = passno; |
| 417 | return ::hasmntopt(&mntent, option.c_str()) != nullptr; |
| 418 | } |
| 419 | |
| 420 | |
| 421 | Try<MountTable> MountTable::read(const string& path) |
no outgoing calls