Skip to content
Snippets Groups Projects
Commit 04a4f7e3 authored by Danny Auble's avatar Danny Auble
Browse files

smap is almost ready for configuration mode to work

parent 54de5e57
No related branches found
No related tags found
No related merge requests found
......@@ -1127,7 +1127,7 @@ int main(int argc, char** argv)
// int i;
// for (i=0; i<8; i++){
// _print_pa_system();
if (!allocate_part(request, &results)){
if (allocate_part(request, &results)){
printf("allocate success for %d%d%d\n",
geo[0], geo[1], geo[2]);
// _print_results(results);
......@@ -1135,8 +1135,8 @@ int main(int argc, char** argv)
}
// }
if (!allocate_part(request, &results)){
printf("allocate success for %d%d%d\n",
if (allocate_part(request, &results)){
printf("I allocated it success for %d%d%d\n",
geo[0], geo[1], geo[2]);
// _print_results(results);
list_destroy(results);
......
......@@ -48,6 +48,7 @@ void get_command(void)
List results;
pa_request_t * request;
pa_init();
text_height = smap_info_ptr->text_win->_maxy; // - smap_info_ptr->text_win->_begy;
text_width = smap_info_ptr->text_win->_maxx; // - smap_info_ptr->text_win->_begx;
text_starty = smap_info_ptr->text_win->_begy;
......@@ -87,13 +88,9 @@ void get_command(void)
endwin();
exit(0);
} else if (!strncmp(com->str, "resume", 6)) {
mvwprintw(smap_info_ptr->text_win,
smap_info_ptr->ycord,
smap_info_ptr->xcord, "%s", com->str);
mvwprintw(smap_info_ptr->text_win, smap_info_ptr->ycord, smap_info_ptr->xcord, "%s", com->str);
} else if (!strncmp(com->str, "drain", 5)) {
mvwprintw(smap_info_ptr->text_win,
smap_info_ptr->ycord,
smap_info_ptr->xcord, "%s", com->str);
mvwprintw(smap_info_ptr->text_win, smap_info_ptr->ycord, smap_info_ptr->xcord, "%s", com->str);
} else if (!strncmp(com->str, "create", 6)) {
/*defaults*/
geo[0] = -1;
......@@ -106,8 +103,7 @@ void get_command(void)
i=6;
/*********/
mvwprintw(smap_info_ptr->text_win, smap_info_ptr->ycord,
smap_info_ptr->xcord, "%s", com->str);
mvwprintw(smap_info_ptr->text_win, smap_info_ptr->ycord, smap_info_ptr->xcord, "%s", com->str);
while(com->str[i]!='\0') {
while(com->str[i-1]!=' ' && com->str[i]!='\0') {
......@@ -131,6 +127,7 @@ void get_command(void)
force_contig=false;
i+=5;
}
}
if(!i2) {
......@@ -150,13 +147,13 @@ void get_command(void)
}
new_pa_request(&request, geo, i, rotate, elongate, force_contig, torus);
if (!allocate_part(request, &results)){
printf("allocate success for %d%d%d\n",
printf("allocate failure for %d%d%d\n",
geo[0], geo[1], geo[2]);
list_destroy(results);
}
}
} else if (!strncmp(com->str, "save", 4)) {
mvwprintw(smap_info_ptr->text_win,
smap_info_ptr->ycord,
......
......@@ -142,7 +142,6 @@ int main(int argc, char *argv[])
box(smap_info_ptr->text_win, 0, 0);
wrefresh(smap_info_ptr->text_win);
wrefresh(smap_info_ptr->grid_win);
partition_allocator_init();
while (!end) {
_get_option();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment