| 917 | namespace devices { |
| 918 | |
| 919 | struct Entry |
| 920 | { |
| 921 | static Try<Entry> parse(const std::string& s); |
| 922 | |
| 923 | struct Selector |
| 924 | { |
| 925 | enum class Type |
| 926 | { |
| 927 | ALL, |
| 928 | BLOCK, |
| 929 | CHARACTER, |
| 930 | }; |
| 931 | |
| 932 | Type type; |
| 933 | Option<unsigned int> major; // Matches all `major` numbers if None. |
| 934 | Option<unsigned int> minor; // Matches all `minor` numbers if None. |
| 935 | }; |
| 936 | |
| 937 | struct Access |
| 938 | { |
| 939 | bool read; |
| 940 | bool write; |
| 941 | bool mknod; |
| 942 | }; |
| 943 | |
| 944 | Selector selector; |
| 945 | Access access; |
| 946 | }; |
| 947 | |
| 948 | std::ostream& operator<<( |
| 949 | std::ostream& stream, |