Commit 9025021d authored by Leigh B Stoller's avatar Leigh B Stoller

Add version() to OSImage to deal with vers/version inconsistency.

See comment in code.
parent 45550fca
......@@ -363,6 +363,23 @@ sub global($)
return $self->osinfo()->shared();
# Version is a bit of a pain. version() in OSinfo is an OS string we rarely
# care about (IsGeneric() does). vers() is the actual version. Normally this
# does not matter, but if the OSImage is encapsulating an OSinfo without
# an Image (which happens, think MFS), then version() will get the wrong
# thing (from the osinfo instead of the image).
sub version()
my ($self) = @_;
return $self->image()->version()
if (defined($self->image()));
return $self->osinfo()->vers();
# Return a list of all images of the given format for the given pid.
# If format is NULL, return all formats. If pid is NULL, return for all pids.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment