From 7e7aeaeba470ab792c9c1862dfbc8b12dbce1b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 5 Jun 2009 09:06:11 +0000 Subject: [PATCH] * Fixed wrong partition name in mkfs, closing ticket #3954. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30970 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/mkfs/FsCreator.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/mkfs/FsCreator.cpp b/src/bin/mkfs/FsCreator.cpp index 6be5bf1f13..c3f17de7f7 100644 --- a/src/bin/mkfs/FsCreator.cpp +++ b/src/bin/mkfs/FsCreator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008 Haiku Inc. All rights reserved. + * Copyright 2008-2009 Haiku Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -172,15 +172,18 @@ FsCreator::Run() return true; } + BString contentName = partition->ContentName(); + // CommitModifications() will invalidate our partition object + status = device.CommitModifications(); if (status == B_OK) { if (fVerbose) { - std::cout << "Volume " << partition->ContentName() - << " has been initialized successfully!\n"; + std::cout << "Volume \"" << contentName.String() + << "\" has been initialized successfully!" << std::endl; } } else { - std::cout << kProgramName << ": Initialization of " - << partition->ContentName() << " failed: " << strerror(status) + std::cout << kProgramName << ": Initialization of \"" + << contentName.String() << "\" failed: " << strerror(status) << std::endl; return false; }