Adjusted due to API changes. It compiles again, but won't work for a
while. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22562 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
28541deac2
commit
4ff2178120
@ -384,10 +384,9 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// validate parameters
|
// validate parameters
|
||||||
char validatedName[B_OS_NAME_LENGTH];
|
BString validatedName(name);
|
||||||
strlcpy(validatedName, name.String(), sizeof(validatedName));
|
|
||||||
if (partition->ValidateInitialize(diskSystem->Name(),
|
if (partition->ValidateInitialize(diskSystem->Name(),
|
||||||
supportsName ? validatedName : NULL, parameters.String())
|
supportsName ? &validatedName : NULL, parameters.String())
|
||||||
!= B_OK) {
|
!= B_OK) {
|
||||||
printf("Validation of the given values failed. Sorry, can't "
|
printf("Validation of the given values failed. Sorry, can't "
|
||||||
"continue.\n");
|
"continue.\n");
|
||||||
@ -399,7 +398,7 @@ private:
|
|||||||
printf("Everything looks dandy.\n");
|
printf("Everything looks dandy.\n");
|
||||||
} else {
|
} else {
|
||||||
printf("The disk system adjusted the file name to \"%s\".\n",
|
printf("The disk system adjusted the file name to \"%s\".\n",
|
||||||
validatedName);
|
validatedName.String());
|
||||||
name = validatedName;
|
name = validatedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,7 +587,8 @@ private:
|
|||||||
// validate parameters
|
// validate parameters
|
||||||
off_t validatedStart = start;
|
off_t validatedStart = start;
|
||||||
off_t validatedSize = size;
|
off_t validatedSize = size;
|
||||||
if (partition->ValidateCreateChild(&start, &size, type,
|
// TODO: Support the name parameter!
|
||||||
|
if (partition->ValidateCreateChild(&start, &size, type, NULL,
|
||||||
parameters.String()) != B_OK) {
|
parameters.String()) != B_OK) {
|
||||||
printf("Validation of the given values failed. Sorry, can't "
|
printf("Validation of the given values failed. Sorry, can't "
|
||||||
"continue.\n");
|
"continue.\n");
|
||||||
@ -633,7 +633,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create child
|
// create child
|
||||||
error = partition->CreateChild(start, size, type,
|
error = partition->CreateChild(start, size, type, NULL,
|
||||||
parameters.String());
|
parameters.String());
|
||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
printf("Creating the partiiton failed: %s\n", strerror(error));
|
printf("Creating the partiiton failed: %s\n", strerror(error));
|
||||||
|
Loading…
Reference in New Issue
Block a user