Volume:Mount(): Better failure output
Also use the FATAL() instead of the ERROR() macro, so something is printed also with debugging disabled.
This commit is contained in:
parent
c99aa60b78
commit
2a5bef01a3
@ -492,19 +492,21 @@ Volume::Mount(const char* parameterString)
|
||||
&delete_driver_settings);
|
||||
|
||||
if (packages == NULL || packages[0] == '\0') {
|
||||
ERROR("need package folder ('packages' parameter)!\n");
|
||||
FATAL("need package folder ('packages' parameter)!\n");
|
||||
RETURN_ERROR(B_BAD_VALUE);
|
||||
}
|
||||
|
||||
error = _InitMountType(mountType);
|
||||
if (error != B_OK) {
|
||||
ERROR("invalid mount type: \"%s\"\n", mountType);
|
||||
RETURN_ERROR(B_ERROR);
|
||||
FATAL("invalid mount type: \"%s\"\n", mountType);
|
||||
RETURN_ERROR(error);
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
if (stat(packages, &st) < 0)
|
||||
if (stat(packages, &st) < 0) {
|
||||
FATAL("failed to stat: \"%s\": %s\n", packages, strerror(errno));
|
||||
RETURN_ERROR(B_ERROR);
|
||||
}
|
||||
|
||||
// If no volume name is given, infer it from the mount type.
|
||||
if (volumeName == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user