Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
fd86599f
Commit
fd86599f
authored
Aug 07, 2017
by
Leigh B Stoller
Browse files
Add ValidUUID() predicate.
parent
f814f9df
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/emutil.pm.in
View file @
fd86599f
#
!/usr/bin/perl -w
#
#
Copyright
(
c
)
2000
-
201
6
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2000
-
201
7
University
of
Utah
and
the
Flux
Group
.
#
#
{{{
EMULAB
-
LICENSE
#
...
...
@@ -34,7 +34,7 @@ use vars qw(@ISA @EXPORT);
TBGetUniqueIndex
ParRun
VersionInfo
UpdateVersionInfo
SpanningTree
GenFakeMac
BackTraceOnWarning
PassWordHash
SSHwithTimeout
TBDateStringGMT
TBDateStringLocal
runBusyLoop
MapEventType
MapEventObjectType
MapEventTriggerType
MapEventType
MapEventObjectType
MapEventTriggerType
ValidUUID
);
use
emdb
;
...
...
@@ -992,5 +992,14 @@ sub MapEventTriggerType($)
return $idx;
}
sub ValidUUID($)
{
my ($uuid) = @_;
if ($uuid =~ /^\w+\-\w+\-\w+\-\w+\-\w+$/) {
return 1;
}
return 0;
}
# _Always_ make sure that this 1 is at the end of the file...
1;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment