``` #include #include #include #include #include int main() { int result = -1; int32 cookie = 0; dev_t currentDev; while ((long)(currentDev = next_dev(&cookie)) >= 0) { struct fs_info info; if (fs_stat_dev(currentDev, &info) != B_OK) { continue; } char name[B_PATH_NAME_LENGTH]; // Two bytes for the name as we're storing "." char buf[sizeof(dirent) + 2]; dirent *entry = (dirent *)&buf; strncpy(entry->d_name, ".", 2); entry->d_pdev = currentDev; entry->d_pino = info.root; if (get_path_for_dirent(entry, name, sizeof(name)) != B_OK) { continue; } std::cout << name << std::endl; } } ``` This produces a reasonable result on HyClone, currently opening up my VM to test on Haiku.