Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elijah Grubb
emulab-devel
Commits
89f64eaa
Commit
89f64eaa
authored
Jun 19, 2015
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For dataset images, do not return loadpart. For client version
>= 2, return lba size info.
parent
1475dd48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
utils/dumpdescriptor.in
utils/dumpdescriptor.in
+11
-4
No files found.
utils/dumpdescriptor.in
View file @
89f64eaa
...
...
@@ -57,7 +57,7 @@ my $TBBASE = "@TBBASE@";
# version of the software we are so it gives something we can handle.
# Be sure to update this if you change the version in image_import
#
my
$METADATA_SERVERVERSION
=
1
;
my
$METADATA_SERVERVERSION
=
2
;
#
# Untaint the path
...
...
@@ -144,7 +144,9 @@ sub DumpImage($)
$xmlfields
{"
gid
"}
=
$image
->
gid
();
}
$xmlfields
{"
description
"}
=
$image
->
description
();
$xmlfields
{"
loadpart
"}
=
$image
->
loadpart
();
if
(
!
$image
->
isdataset
())
{
$xmlfields
{"
loadpart
"}
=
$image
->
loadpart
();
}
$xmlfields
{"
global
"}
=
$image
->
global
();
$xmlfields
{"
shared
"}
=
$image
->
shared
();
if
(
defined
(
$image
->
path
())
&&
$image
->
path
()
ne
"")
{
...
...
@@ -164,6 +166,11 @@ sub DumpImage($)
$xmlfields
{"
mbr_version
"}
=
$image
->
mbr_version
();
if
(
$clientvers
>
0
)
{
$xmlfields
{"
isdataset
"}
=
$image
->
isdataset
();
if
(
$clientvers
>
1
&&
$image
->
isdataset
())
{
$xmlfields
{"
lba_low
"}
=
$image
->
lba_low
();
$xmlfields
{"
lba_high
"}
=
$image
->
lba_high
();
$xmlfields
{"
lba_size
"}
=
$image
->
lba_size
();
}
}
if
(
$export
)
{
...
...
@@ -197,7 +204,7 @@ sub DumpImage($)
return
$osinfo
->
pid
()
.
"
,
"
.
$osinfo
->
osname
();
}
if
(
!
$image
->
ezid
(
))
{
if
(
!
(
$image
->
ezid
()
||
$image
->
isdataset
()
))
{
$xmlfields
{"
loadlength
"}
=
$image
->
loadlength
();
$xmlfields
{"
part1_osid
"}
=
MapOS
(
$image
->
part1_osid
());
$xmlfields
{"
part2_osid
"}
=
MapOS
(
$image
->
part2_osid
());
...
...
@@ -205,7 +212,7 @@ sub DumpImage($)
$xmlfields
{"
part4_osid
"}
=
MapOS
(
$image
->
part4_osid
());
$xmlfields
{"
default_osid
"}
=
MapOS
(
$image
->
default_osid
());
}
els
e
{
els
if
(
!
$image
->
isdataset
())
{
my
$osinfo
=
OSinfo
->
Lookup
(
$image
->
imageid
());
if
(
!
defined
(
$osinfo
))
{
fatal
("
Could not find osid for
$image
");
...
...
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