Commit 0745f957 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Oops, remove all the other cruft from the last commit that is not

ready for prime time yet.
parent 2c32ce9f
...@@ -3456,14 +3456,10 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -3456,14 +3456,10 @@ COMMAND_PROTOTYPE(doloadinfo)
*/ */
disktype = DISKTYPE; disktype = DISKTYPE;
disknum = DISKNUM; disknum = DISKNUM;
res = mydb_query("select disktype,bootdisk_unit from nodes as n "
res = mydb_query("select attrkey,attrvalue from nodes as n " "left join node_types as nt on n.type = nt.type "
"left join node_type_attributes as a on " "where n.node_id='%s'",
" n.type=a.type " 2, reqp->nodeid);
"where (a.attrkey='bootdisk_unit' or "
" a.attrkey='disktype') and "
" n.node_id='%s'", 2, reqp->nodeid);
if (!res) { if (!res) {
error("doloadinfo: %s: DB Error getting disktype!\n", error("doloadinfo: %s: DB Error getting disktype!\n",
reqp->nodeid); reqp->nodeid);
...@@ -3471,21 +3467,11 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -3471,21 +3467,11 @@ COMMAND_PROTOTYPE(doloadinfo)
} }
if ((int)mysql_num_rows(res) > 0) { if ((int)mysql_num_rows(res) > 0) {
int nrows = (int)mysql_num_rows(res); row = mysql_fetch_row(res);
if (row[0] && row[0][0])
while (nrows) { disktype = row[0];
row = mysql_fetch_row(res); if (row[1] && row[1][0])
disknum = atoi(row[1]);
if (row[1] && row[1][0]) {
if (strcmp(row[0], "bootdisk_unit") == 0) {
disknum = atoi(row[1]);
}
else if (strcmp(row[0], "disktype") == 0) {
disktype = row[1];
}
}
nrows--;
}
} }
OUTPUT(bufp, ebufp - bufp, " DISK=%s%d ZFILL=%d\n", OUTPUT(bufp, ebufp - bufp, " DISK=%s%d ZFILL=%d\n",
disktype, disknum, zfill); disktype, disknum, zfill);
...@@ -4797,8 +4783,9 @@ COMMAND_PROTOTYPE(doixpconfig) ...@@ -4797,8 +4783,9 @@ COMMAND_PROTOTYPE(doixpconfig)
*/ */
res = mydb_query("select i1.IP,i1.iface,i2.iface,i2.mask,i2.IP " res = mydb_query("select i1.IP,i1.iface,i2.iface,i2.mask,i2.IP "
" from nodes as n " " from nodes as n "
"left join node_types as nt on n.type=nt.type "
"left join interfaces as i1 on i1.node_id=n.node_id " "left join interfaces as i1 on i1.node_id=n.node_id "
" and i1.role='ctrl' " " and i1.iface=nt.control_iface "
"left join interfaces as i2 on i2.node_id='%s' " "left join interfaces as i2 on i2.node_id='%s' "
" and i2.card=i1.card " " and i2.card=i1.card "
"where n.node_id='%s'", "where n.node_id='%s'",
......
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