| 31 | } |
| 32 | |
| 33 | std::map<std::string, std::string> getMetadata() override |
| 34 | { |
| 35 | HfsMount m(this); |
| 36 | |
| 37 | hfsvolent ve; |
| 38 | if (hfs_vstat(_vol, &ve)) |
| 39 | throw BadFilesystemException(); |
| 40 | |
| 41 | std::map<std::string, std::string> attributes; |
| 42 | attributes[VOLUME_NAME] = ve.name; |
| 43 | attributes[TOTAL_BLOCKS] = std::to_string(ve.totbytes / ve.alblocksz); |
| 44 | attributes[USED_BLOCKS] = |
| 45 | std::to_string((ve.totbytes - ve.freebytes) / ve.alblocksz); |
| 46 | attributes[BLOCK_SIZE] = std::to_string(ve.alblocksz); |
| 47 | return attributes; |
| 48 | } |
| 49 | |
| 50 | FilesystemStatus check() override |
| 51 | { |
nothing calls this directly
no test coverage detected