Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
b07f319c
Commit
b07f319c
authored
Oct 07, 2009
by
Gary Wong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a command line option to specify the output rspec filename.
parent
d603d98a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
assign/assign.cc
assign/assign.cc
+12
-3
No files found.
assign/assign.cc
View file @
b07f319c
...
...
@@ -456,6 +456,7 @@ void print_help() {
#ifdef WITH_XML
cout
<<
" -q <file> - Specify a rspec ptop file"
<<
endl
;
cout
<<
" -w <file> - Specify a rspec vtop file"
<<
endl
;
cout
<<
" -W <file> - Specify the output rspec file"
<<
endl
;
#endif
cout
<<
" -F - Apply additional checking to fixed nodes"
<<
endl
;
cout
<<
" -D - Dump configuration options"
<<
endl
;
...
...
@@ -848,8 +849,9 @@ int main(int argc,char **argv) {
char
*
ptopFilename
=
""
;
char
*
vtopFilename
=
""
;
while
((
ch
=
getopt
(
argc
,
argv
,
"s:v:l:t:rpPTdH:oguc:nx:X:y:Y:q:w:FD"
))
!=
-
1
)
{
char
*
vtopOutputFilename
=
0
;
while
((
ch
=
getopt
(
argc
,
argv
,
"s:v:l:t:rpPTdH:oguc:nx:X:y:Y:q:w:W:FD"
))
!=
-
1
)
{
switch
(
ch
)
{
case
's'
:
if
(
sscanf
(
optarg
,
"%d"
,
&
seed
)
!=
1
)
{
...
...
@@ -967,6 +969,13 @@ int main(int argc,char **argv) {
}
vtopFilename
=
optarg
;
break
;
case
'W'
:
if
(
strcmp
(
optarg
,
""
)
==
0
)
{
print_help
();
}
vtopOutputFilename
=
optarg
;
break
;
#endif
case
'F'
:
check_fixed_nodes
=
true
;
...
...
@@ -1203,7 +1212,7 @@ int main(int argc,char **argv) {
// For now, only produce annotated file if we succeeded - print the
// text version regardless
if
(
violated
==
0
)
{
print_solution
(
best_solution
,
annotated_filename
(
vtopFilename
).
c_str
());
print_solution
(
best_solution
,
vtopOutputFilename
?
vtopOutputFilename
:
annotated_filename
(
vtopFilename
).
c_str
());
}
else
{
print_solution
(
best_solution
);
}
...
...
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