Now uses Inode::GetName() and strlcpy().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2086 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-11-25 18:43:11 +00:00
parent c0f2928e7d
commit 2ad0108fbe

View File

@ -798,8 +798,9 @@ BlockAllocator::CheckNextNode(check_control *control)
control->errors = 0;
control->status = CheckInode(inode, control);
const char *name = inode->Name();
strcpy(control->name, name ? name : "(node has no name)");
if (inode->GetName(control->name) < B_OK)
strcpy(control->name, "(node has no name)");
control->inode = inode->ID();
control->mode = inode->Mode();
@ -826,7 +827,7 @@ BlockAllocator::CheckNextNode(check_control *control)
continue;
// fill in the control data as soon as we have them
strcpy(control->name, name);
strlcpy(control->name, name, B_FILE_NAME_LENGTH);
control->inode = id;
control->errors = 0;
@ -848,10 +849,6 @@ BlockAllocator::CheckNextNode(check_control *control)
}
}
strcpy(control->name, name ? name : "(node has no name)");
control->inode = inode->ID();
control->mode = inode->Mode();
control->mode = inode->Mode();
// Check for the correct mode of the node (if the mode of the