* Volume::Mount(): fix KDL in case the volume-name was missing from
the mount parameters * packagefs_read_stat(): put some sane value into st_blocks git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40227 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -344,7 +344,7 @@ Volume::Mount(const char* parameterString)
|
|||||||
RETURN_ERROR(error);
|
RETURN_ERROR(error);
|
||||||
|
|
||||||
const char* packages = NULL;
|
const char* packages = NULL;
|
||||||
const char* volumeName = "Package FS";
|
const char* volumeName = NULL;
|
||||||
void* parameterHandle = parse_driver_settings_string(parameterString);
|
void* parameterHandle = parse_driver_settings_string(parameterString);
|
||||||
if (parameterHandle != NULL) {
|
if (parameterHandle != NULL) {
|
||||||
packages
|
packages
|
||||||
@@ -362,7 +362,7 @@ Volume::Mount(const char* parameterString)
|
|||||||
fRootDirectory = new(std::nothrow) Directory(kRootDirectoryID);
|
fRootDirectory = new(std::nothrow) Directory(kRootDirectoryID);
|
||||||
if (fRootDirectory == NULL)
|
if (fRootDirectory == NULL)
|
||||||
RETURN_ERROR(B_NO_MEMORY);
|
RETURN_ERROR(B_NO_MEMORY);
|
||||||
fRootDirectory->Init(NULL, volumeName);
|
fRootDirectory->Init(NULL, volumeName != NULL ? volumeName : "Package FS");
|
||||||
fNodes.Insert(fRootDirectory);
|
fNodes.Insert(fRootDirectory);
|
||||||
|
|
||||||
// create default package domain
|
// create default package domain
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ packagefs_read_stat(fs_volume* fsVolume, fs_vnode* fsNode, struct stat* st)
|
|||||||
st->st_ctim = st->st_mtim;
|
st->st_ctim = st->st_mtim;
|
||||||
// TODO: Perhaps manage a changed time (particularly for directories)?
|
// TODO: Perhaps manage a changed time (particularly for directories)?
|
||||||
st->st_crtim = st->st_mtim;
|
st->st_crtim = st->st_mtim;
|
||||||
|
st->st_blocks = st->st_size / 512;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user