- space problems in casts
- don't cast 0, use NULL
- don't have long lines
- don't cast malloc
- use warn/warnx instead of fprintf
- fix bug where a failed mount_mfs would cause the program to continue.
- pass lint
- Always attempt mfs dev if missing /dev/console
- Save and run both MAKEDEV and MAKEDEV.local
- After creating the mfs dev, mknod() and freopen() /dev/console.
- If MAKEDEV is missing do not fail out early, but still create the mfs,
/dev/console.
- If we hit any errors fail out to single user.
This change _only_ affects systems booting without /dev/console.
on the command line with the -u, -g and -p options respectively.
The old malloc() replacement (and related functions) didn't work with
the libc get{pw,gr}nam() functions so it was removed and a separate
memory allocation function added that is only called to allocate the
space for the MFS file system.
Also use a table for the usage flags instead of multiple fprintf()'s
with "if (mfs)" checks sprinkled through.
restricted if -c isn't given; it just confuses a user of newfs (and
the cpg info is printed as part of the display anyway), and prints an
unnecessary warning for mount_mfs.
if there is no command line option and the disklabel gives 0 as the size.
The default used to be 8k, not the default is picked depending on the
file system size. FS < 20M gets 4k, <1G get 8k, and >1G get 16k.
The 16k default was suggested by lukem which FreeBSD is using.
- Change the default cpg from 16 to 65536, which effectively means
that the largest allowable value for cpg will be computed if it's
not specified with -c or in the disklabel for that partition.
This is much more convenient for users.
- Improve the description of the defaults for various options
to define the tape size. Requires the tape driver to either return ENOSPC
at end of media, or 0 when a write is attempted (such as the "early warning"
support in st(4) enabled with "mt eew 1"). From FreeBSD.