tables being written on disk:
- when counting non-BSD partitions, use part[i], not part[0]
- when using full disk for NetBSD, initialise all the fileds of the
mbr entries (especially flags)
- When converting to on-disk format, if start and size = 0, initialise
c/h/s to 0 for both start and end. convert_mbr_chs() would make an entry
0/0/0, 0/0/1 which is not bogus, but not what we really want either.
cleanups before extracting a set. Should'nt do anything for an install,
as the filesystem shouldn't contain files that need to be removed.
cleanup_dist() is called before extract_file() for each set (the set name
is passed as parameter). It will open a file /dist/<set name>_obsolete
if it exists. This file should contain a list of files (absolutes
pathnames) that needs to be removed. cleanup_dist() will lstat() each file
to determine if it's there and if it's a directory or not.
It will then unlink() entries that are not directories and then rmdir()
directories. If a directory is not empty (it should now if the list of files
is correct) it will be renamed to <directory.old> and the user will be warned.
Other changes:
- move prototype of target_prefix() in defs.h, don't maintain a copy
of it in each file.
- in install.c, after MSG_disksetupdone, do a wclear(stdscr) (display was
clobbered after it).
- kill MSG_openmsgbuf, it's not used anywhere
- after MSG_disksetupdone in upgrade, don't call MENU_ok, do it the
same way as in install.
- add wclear(stdscr);/wrefresh(stdscr); before calling MENU_distset (another
display problem ...)
- While I'm there, move ask_verbose_dist() before MENU_distmedium. This way,
if all go well the user can go away one ftp starts and come back once
sets are extracted.
- in run_prog(), do an explicit wclear(stdscr); wrefresh(stdscr);
before launching subwindows. This seems to solve all the display
problems associated with run_prog().
enter partitions offet and size. The user can chose unit independantly of
the unit used for display ('M'/'c'/'s'). These functions do the proper
bound checks and alignement/roudups. Used in the edfspart menu and
i386 md_make_bsd_partitions() (other ports should do the change as
well).
- now that getpartsize() does the rigth thing, kill the swapadj hack (which was
buggy anyway).
- in i386 md_make_bsd_partitions(), don't propose defaults that don't fit on
the disk. If the disk is too small, fallback to custom instead.
- fix a bug in mbr.c, where the partition flags would not have always been
reset. sysinst created me a MBR with 2 active partition. The boot code
doesn't like it :)
- added a message for eventual mount failures.
- killed donewfs and extracting messages, as we run the commands in a
subwindow these messages just flashed on the screen.
- Changes a few exit(1) to return(1), to give the user a second chance.
- added msg_clear() or wclear(stdscr) in a place or two, to make
display a bit nicer.
- in run_cmd(), if the command succeeded, don't wait for the user to
press enter.
- Make all the functions called from do_install() return an error code,
so that we can abort install if something went wrong.
- Add a 'errstr' argument to run_prog(), which if not NULL is displayed
with msg_printf() and followed by process_menu(MENU_ok) if the command fail.
Used to warn the user that the current action is aborted.
- in a few places use msg_display() or msg_printf() rather than printf.
It seems that stdout/stderr are not always pointing to the active curses
window.
- garbage-collecd unused messages, add a few new one (error handling).
XXX only tested on i386. Other md parts should be tested as well.
* Use structures, not 2-dimensional arrays..
* Use the DIOCGDEFLABEL ioctl to get the disk information,
to avoid confusion with (older) labels.
* Don't ever call fdisk for partitioning. This was the
source of much confusion.
* For the i386, use the BIOS geometry information passed by
the bootblocks.
Lots of things left to do, but it's a start.
encoded. This means certain passwords, usernames, etc., will not work
with "ftp ftp://...."
This code, submitted by Alan Barrett <apb@iafrica.com>, fixes this by
hex encoding unsafe strings in a clean fashion. This should close a
couple of outstanding PRs. Thanks Alan!
commandlines for all tar operations. (work supplied by Matt Green)
2) Update arch/*/md.c to deal with new sysinst/run.c. Special case
anything that needs to do a redirect or a pipe.
3) #if 0 some unused code in target.c. This code will need to be updated,
or special cased with do_system.
Big thank you to Matt for all his work on this.
Scripting and logging functionality for sysinst.
Child programs are run in a "display window" so you can actually see what
they did before the screen flashes back and you loose it all.
Lots of curses fixups. Removed nasty endwins that mangled the tty upon
rentry.
Change the yes/no box to accept Y or N, and not require cursor motion to
decide one or the other.
Perform curses redraws when doing things that could cause the kernel to
spew printfs onto your screen.