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
e2d292dc
Commit
e2d292dc
authored
May 18, 2004
by
Mike Hibler
Browse files
Grab bootdisk_unit out of DB (rather than assuming '0') for loadinfo command.
Needed for new PCs with SATA disks which start as "ad4".
parent
139b89c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/tmcd.c
View file @
e2d292dc
...
...
@@ -3215,10 +3215,10 @@ COMMAND_PROTOTYPE(doloadinfo)
*/
disktype
=
DISKTYPE
;
disknum
=
DISKNUM
;
res
=
mydb_query
(
"select disktype from nodes as n "
res
=
mydb_query
(
"select disktype
,bootdisk_unit
from nodes as n "
"left join node_types as nt on n.type = nt.type "
"where n.node_id='%s'"
,
1
,
reqp
->
nodeid
);
2
,
reqp
->
nodeid
);
if
(
!
res
)
{
error
(
"doloadinfo: %s: DB Error getting disktype!
\n
"
,
reqp
->
nodeid
);
...
...
@@ -3229,6 +3229,8 @@ COMMAND_PROTOTYPE(doloadinfo)
row
=
mysql_fetch_row
(
res
);
if
(
row
[
0
]
&&
row
[
0
][
0
])
disktype
=
row
[
0
];
if
(
row
[
1
]
&&
row
[
1
][
0
])
disknum
=
atoi
(
row
[
1
]);
}
OUTPUT
(
bufp
,
ebufp
-
bufp
,
" DISK=%s%d
\n
"
,
disktype
,
disknum
);
mysql_free_result
(
res
);
...
...
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