st_dev field corresponds to dev{major,minor} and not rdev{major,minor}.