fs_read_info() will now also succeed if the file system in question does

not support the read_fs_info() function - only the values that the VFS
does know about are filled in, then.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8735 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-08-31 03:41:29 +00:00
parent b9a3a4663f
commit 0ebb4701b9
1 changed files with 6 additions and 6 deletions

View File

@ -3510,29 +3510,29 @@ static status_t
fs_read_info(dev_t device, struct fs_info *info)
{
struct fs_mount *mount;
int status;
status_t status = B_OK;
mutex_lock(&sMountMutex);
mount = find_mount(device);
if (mount == NULL) {
status = EINVAL;
status = B_BAD_VALUE;
goto out;
}
// fill in info the file system doesn't (have to) know about
memset(info, 0, sizeof(struct fs_info));
info->dev = mount->id;
info->root = mount->root_vnode->id;
strlcpy(info->fsh_name, mount->fs_name, sizeof(info->fsh_name));
if (mount->device_name != NULL)
strlcpy(info->device_name, mount->device_name, sizeof(info->device_name));
else
info->device_name[0] = '\0';
if (FS_MOUNT_CALL(mount, read_fs_info))
status = FS_MOUNT_CALL(mount, read_fs_info)(mount->cookie, info);
else
status = EOPNOTSUPP;
// if the call is not supported by the file system, there are still
// the parts that we filled out ourselves
out:
mutex_unlock(&sMountMutex);