#define CMD_CREATE 0x4001
#define CMD_MIGRATE 0x4002
#define CMD_SILENTEXIST 0x4003
+#define CMD_SILENT 0x4004
struct option const
{ "tag", required_argument, 0, CMD_TAG },
{ "create", no_argument, 0, CMD_CREATE },
{ "migrate", no_argument, 0, CMD_MIGRATE },
+ { "silent", no_argument, 0, CMD_SILENT },
{ "silentexist", no_argument, 0, CMD_SILENTEXIST },
{ 0,0,0,0 },
};
"<opts> can be:\n"
" --silentexist ... be silent when context exists already; useful\n"
" for '--create' only\n"
+ " --silent ... if the feature is not supported, just execute\n"
+ " <program>\n"
"\n"
"'vtag --create' exits with code 254 iff the context exists already.\n"
"\n"
{
tag_t tag;
- if (!vc_isSupported(vcFEATURE_PPTAG))
- goto exec;
+ if (!vc_isSupported(vcFEATURE_PPTAG)) {
+ if (args->verbosity >= 1) {
+ errno = ENOSYS;
+ perror(ENSC_WRAPPERS_PREFIX);
+ return wrapper_exit_code;
+ }
+ else
+ goto exec;
+ }
if (args->do_create) {
tag = vc_tag_create(args->tag);
while (1) {
int c = getopt_long(argc, argv, "+", CMDLINE_OPTIONS, 0);
if (c==-1) break;
-
+
switch (c) {
case CMD_HELP : showHelp(1, argv[0], 0);
case CMD_VERSION : showVersion();
case CMD_MIGRATE : args.do_migrate = true; break;
case CMD_SILENTEXIST : args.is_silentexist = true; break;
case CMD_TAG : args.tag = Evc_tagopt2tag(optarg,true); break;
+ case CMD_SILENT : args.verbosity--; break;
default :
WRITE_MSG(2, "Try '");