tools: deprecate nfdc create and nfdc destroy
They are deprecated in favor of nfdc face create and nfdc face destroy.
There is also a minor correction to nfdc-face man page.
refs #3864
Change-Id: I038bc604304ac5650101ee2afe30753e59061632
diff --git a/tools/nfdc/legacy-nfdc.cpp b/tools/nfdc/legacy-nfdc.cpp
index 86d9ad5..5f4f81f 100644
--- a/tools/nfdc/legacy-nfdc.cpp
+++ b/tools/nfdc/legacy-nfdc.cpp
@@ -326,8 +326,13 @@
}
void
-legacyNfdcMain(ExecuteContext& ctx)
+legacyNfdcMain(ExecuteContext& ctx, const std::string& replacementCommand)
{
+ if (!replacementCommand.empty()) {
+ std::cerr << "'nfdc " << ctx.noun << "' command is deprecated. "
+ << "Use 'nfdc " << replacementCommand << "' instead.\n";
+ }
+
LegacyNfdc p(ctx.face, ctx.keyChain);
const std::string& subcommand = ctx.noun;