TASK:
FIX BUG INSTALL/17792: INSTALL PROCESS ORDER - NETWORK VERSES DISK
NAME:
Vasil Bozhurski (SlightRemorse)
DATE:
2012/12/02 16:36 GMT+2
FILES:
src\distrib\utils\sysinst\defs.h
src\distrib\utils\sysinst\util.c
src\distrib\utils\sysinst\install.c
src\distrib\utils\sysinst\upgrade.c
ISSUE LINKS:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=17792
http://www.google-melange.com/gci/task/view/google/gci2012/7983210
ISSUE DESCRIPTION:
The installer  writes changes to the disk prior to actually confirming if a device is working properly and could be used to get the distribution set.
FIX:
Created a new function in util.c called get_medium().
=> get_medium() calls a single MENU_distmedium loop to determine the user's action prior any disk changes.

Calling function get_medium() in install.c's do_install() function prior disk changes and storing status information  in int status.

Slightly modified the get_and_unpack_sets() function in util.c to include an int pointer argument which determines whether or not get_medium() was used. 
=> NULL - not used; 
=> pointer - takes pointer data;

Tweaked all get_and_unpack_sets() functions in both install.c and upgrade.c to include the last argument.
=> Install.c uses a pointer to the variable used by get_medium();
=> Upgrade.c uses NULL to run get_and_unpack_sets() as it used to prior this source edit.

Added missing variables.

In defs.h:
Included get_medium(int*) declaration. Added int* to get_and_unpack_sets() function.

Fixed a few aesthetic with the code.


