[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 1/4] mg-allocate: Use ^ for deallocation, not !
! is annoying because some shells enable !-history expantion by default even though few users have any idea about it. In general users are confused by the error message and do not know what to do next. We still honour ! for the benefit of old wrapper scripts, finger macros, etc. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- README.dev | 4 ++-- mg-allocate | 8 ++++---- mg-schema-test-database | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.dev b/README.dev index 95fc66c..5787bd8 100644 --- a/README.dev +++ b/README.dev @@ -13,10 +13,10 @@ e.g. $ ./mg-hosts manual-task-create ianc@kazak Borrow, estimating 1 day duration (for the planner): -$ ./mg-allocate -U 1d marilith-n5 +$ ./mg-allocate -U 1d marilith-n5 Return (not automatic, even with an estimate given): -$ ./mg-allocate \!marilith-n5 +$ ./mg-allocate ^marilith-n5 Removing machines for servicing/outage ====================================== diff --git a/mg-allocate b/mg-allocate index c30dd15..087b14b 100755 --- a/mg-allocate +++ b/mg-allocate @@ -5,11 +5,11 @@ # ./mg-allocate [-l] [-l] [-l] # # <resource-spec> syntax: -# [!][<type>/]<name>[/<share>] type defaults to 'host' +# [^][<type>/]<name>[/<share>] type defaults to 'host' # type=='S' means 'shared-host' # type=='F' means 'shared-flight' # share defaults to * -# "!" prefix means deallocate +# "^" prefix (or "!") means deallocate # name=option|option|... means # any one of those options # option={flag,flag...} means anything @@ -38,7 +38,7 @@ # be owned by the current task (or perhaps by a task # named in --steal). # -# Not compatible with the !<resource> deallocation +# Not compatible with the ^<resource> deallocation # syntax: donation implies deallocation, in a sense. # # --steal <task-spec> @@ -125,7 +125,7 @@ END sub parse_1res ($) { my ($res) = @_; - $res =~ m,^(\!?) (?: ([^/]+)/ )? ([^/]+) (?: /(\d+|\*) )?$,x + $res =~ m,^([!^]?) (?: ([^/]+)/ )? ([^/]+) (?: /(\d+|\*) )?$,x or die "bad resource $res ?"; my $allocate= !$1; my $restype= defined($2) ? $2 : 'host'; diff --git a/mg-schema-test-database b/mg-schema-test-database index 641aadb..6aeedd1 100755 --- a/mg-schema-test-database +++ b/mg-schema-test-database @@ -71,7 +71,7 @@ # ./mg-schema-test-database drop [_SUFFIX] # This will throw away all of the information in the test DB. # -# 5. OSSTEST_TASK=iwj@testing ./mg-allocate !a-host +# 5. OSSTEST_TASK=iwj@testing ./mg-allocate ^a-host # Hosts that were marked in the main DB as borrowed, are returned by # mg-schema-test-database to the main DB task that previously owned # them, but not freed. So you need to explicitly free them. -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |