Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
737afccd
Commit
737afccd
authored
Mar 24, 2011
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add routine to get stuff out of the version_info table.
parent
b7f47d56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
db/emutil.pm.in
db/emutil.pm.in
+20
-2
No files found.
db/emutil.pm.in
View file @
737afccd
#
!/usr/bin/perl -w
#
#
EMULAB
-
COPYRIGHT
#
Copyright
(
c
)
2000
-
201
0
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2000
-
201
1
University
of
Utah
and
the
Flux
Group
.
#
All
rights
reserved
.
#
#
Utility
routines
for
Emulab
.
...
...
@@ -14,7 +14,7 @@ use vars qw(@ISA @EXPORT);
@
ISA
=
qw
(
Exporter
SelfLoader
);
@
EXPORT
=
qw
(
TBDB_CHECKDBSLOT_NOFLAGS
TBDB_CHECKDBSLOT_WARN
TBDB_CHECKDBSLOT_ERROR
TBcheck_dbslot
TBFieldErrorString
TBGetUniqueIndex
ParRun
);
TBGetUniqueIndex
ParRun
VersionInfo
);
use
emdb
;
use
English
;
...
...
@@ -461,5 +461,23 @@ sub ParRun($$$@)
return 0;
}
#
# Version Info
#
sub VersionInfo($)
{
my ($name) = @_;
my $query_result =
DBQueryWarn("select value from version_info ".
"where name='
$
name
'");
return undef
if (!$query_result || !$query_result->numrows);
my ($value) = $query_result->fetchrow_array();
return $value;
}
# _Always_ make sure that this 1 is at the end of the file...
1;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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