X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fvtag.c;h=b8567140472cb69ba072a42d4081a1b23f8c2457;hb=b7785f953cf988346d0f36c5852af39db3d1b00c;hp=edf97662dc1c58374c30022b6bb546c27e13d64e;hpb=19ef6bad17e92a9cedb7db8eddee2bebf1aa7c4d;p=util-vserver.git diff --git a/src/vtag.c b/src/vtag.c index edf9766..b856714 100644 --- a/src/vtag.c +++ b/src/vtag.c @@ -1,4 +1,4 @@ -// $Id$ --*- c -*-- +// $Id: vtag.c 2674 2008-01-27 07:55:13Z dhozac $ --*- c -*-- // Copyright (C) 2007 Daniel Hokka Zakrisson // @@ -109,6 +109,16 @@ doit(struct Arguments const *args, char *argv[]) else goto exec; } + if (args->tag == VC_DYNAMIC_XID) { + if (args->verbosity >= 1) { + WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n"); + return wrapper_exit_code; + } + else { + WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "WARNING: A dynamic tag has been specified, this is not supported\n"); + goto exec; + } + } if (args->do_create) { tag = vc_tag_create(args->tag); @@ -140,7 +150,7 @@ exec: int main (int argc, char *argv[]) { struct Arguments args = { - .tag = VC_NOCTX, + .tag = VC_DYNAMIC_XID, .do_create = false, .do_migrate = false, .is_silentexist = false, @@ -173,8 +183,6 @@ int main (int argc, char *argv[]) WRITE_MSG(2, "Neither '--create' nor '--migrate' specified; try '--help' for more information\n"); else if (args.do_create && args.do_migrate) WRITE_MSG(2, "Can not specify '--create' and '--migrate' at the same time; try '--help' for more information\n"); - else if (args.tag==VC_NOCTX) - WRITE_MSG(2, "You must specify the tag with '--tag'; try '--help' for more information\n"); else if (optind>=argc) WRITE_MSG(2, "No command given; use '--help' for more information.\n"); else