Skip to content
GitLab
Menu
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
4f3240e8
Commit
4f3240e8
authored
Jun 09, 2000
by
Mac Newbold
Browse files
Added support for displaying fields without choosing a value.
parent
a7a0199d
Changes
1
Hide whitespace changes
Inline
Side-by-side
db/avail
View file @
4f3240e8
...
...
@@ -25,15 +25,13 @@ print "Got ARGS = ",join(" ",@ARGV),"\n" if $d;
my
%args
=
();
while
(
$#ARGV
>=
0
)
{
$_
=
shift
;
if
(
!
grep
'
=
'
)
{
$args
{
$_
}
=
'
=
';
if
(
!
/=/
)
{
$args
{
$_
}
=
'
=
';
}
else
{
@
_
=
split
('
=
',
$_
);
my
(
$opt
,
$val
)
=
@
_
if
(
$
#_ >= 0);
if
(
!
defined
(
$val
))
{
$val
=
"";
}
$args
{
$opt
}
=
$val
if
(
defined
(
$opt
));
}
@
_
=
split
('
=
',
$_
);
my
(
$opt
,
$val
)
=
@
_
if
(
$
#_ >= 0);
if
(
!
defined
(
$val
))
{
$val
=
"";
}
$args
{
$opt
}
=
$val
if
(
defined
(
$opt
));
}
if
(
$d
)
{
print
"
Parsed args to:
\n
";
foreach
my
$opt
(
keys
%args
)
{
...
...
@@ -46,21 +44,23 @@ my $cols= "a.node_id,a.type";
my
$cond
=
"
b.node_id is null and a.type!='switch'
";
my
$img
=
0
;
if
(
defined
(
$args
{"
type
"}))
{
$cond
.=
"
and a.type='
"
.
$args
{"
type
"}
.
"
'
";
}
if
(
defined
(
$args
{"
type
"}))
{
$cond
.=
"
and a.type='
"
.
$args
{"
type
"}
.
"
'
"
if
$args
{"
type
"}
ne
'
=
';
}
if
(
defined
(
$args
{"
OS
"}))
{
$img
=
1
;
$cols
.=
"
,d.OS
";
$cond
.=
"
and d.OS='
"
.
$args
{"
OS
"}
.
"
'
";
$cond
.=
"
and d.OS='
"
.
$args
{"
OS
"}
.
"
'
"
if
$args
{"
OS
"}
ne
'
=
'
;
}
if
(
defined
(
$args
{"
ver
"}))
{
$img
=
1
;
$cols
.=
"
,d.ver
";
$cond
.=
"
and d.ver='
"
.
$args
{"
ver
"}
.
"
'
";
$cond
.=
"
and d.ver='
"
.
$args
{"
ver
"}
.
"
'
"
if
$args
{"
ver
"}
ne
'
=
'
;
}
if
(
defined
(
$args
{"
extras
"}))
{
$img
=
1
;
$cols
.=
"
,d.extras
";
$cond
.=
"
and d.extras='
"
.
$args
{"
extras
"}
.
"
'
";
$cond
.=
"
and d.extras='
"
.
$args
{"
extras
"}
.
"
'
"
if
$args
{"
extras
"}
ne
'
=
'
;
}
#if (defined($args{"fixes"})) {
# $join .= "";
...
...
Write
Preview
Supports
Markdown
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