Commit graph

25 commits

Author SHA1 Message Date
Lionel Sambuc e1acf37d77 usr.sbin/mkfs: Allow -b SIZE with proto file
Previously, if a proto file was given, the -b argument would be ignored.

Also added:
 - if the number of inodes is not given, then an estimation is used.
 - sanity checks where moved from one special case to the general case.

Change-Id: I2abfa52bf34206c9087c64b5bfc26af866eb47cb
2013-05-24 11:08:15 +02:00
Ben Gras fd5f2edf35 mkfs: only complain about failing stat with -d
mkfs -d is a feature that needs a stat() of the mkfs binary, which
often fails (as mkfs is often not invoked with a full path or from
the same directory). it makes setup look a bit messy as the error
is always printed while installing the system, for each created FS,
even though the situation is harmless. This change only complains
when the stat is actually needed (-d).

Change-Id: I54ac01505aa97c1cbe40456c04a35aed5a7ee953
2013-05-23 12:09:38 +02:00
Antoine Leca 49fe5d1617 mkfs reloaded
* restored the zone>block stuff
* generalized the support for more-than-1-block bitmaps to also deal
  with big inodes maps in small blocks
* improved pexit() to printf-like syntax; also replaced pexit() with
  err() or errx() where there are no reference to proto lines
* unified the allocation of blocks to all use alloc_block() instead
  of raw malloc half of the time
* removed the V2_ d2_ etc. prefixes which are obscure and obsolete

While here, also
* used new-form definitions, and closer to KNF style in general
* used often-built-ins such as mem* or strncpy where relevant
* pruned a fair amount of constants which are irrelevant

Thanks to Thomas V. and Lionel who did a good amount of work with the
cross-compilation stuff and made that change to be much smoother.
2013-05-13 11:17:34 +02:00
Ben Gras 236a320240 mkfs.mfs: double indirect block support
. allows >4MB files for default 4k block size

Change-Id: I09277fc3704fac1a44af82202c11435dc7ae8d55
2013-04-27 16:25:45 +02:00
Kees Jongenburger 04ad4fa1a2 mkfs.mfs:add comment about the overflow check.
Change-Id: I1f09c3a62377164296037f6dc9b7874023123311
2013-04-19 13:10:06 +02:00
Kees Jongenburger a4eca06cca mkfs.mfs:fix to allow to fill larger file systems.
Allow the number of written blocks to exceed 8 * block_size.

Change-Id: I301ce46a92d86c6220c3af2acee22db26a4b4496
2013-04-19 13:10:06 +02:00
Kees Jongenburger 1beca4b7f5 mkfs.mfs:remove some globals
Remove the gobal inocount, zonecount and blockcount.

Change-Id: I77d120bb79bcf183e0c6b5abed736343af7badf2
2013-04-19 13:10:06 +02:00
Lionel Sambuc b622d2b795 mkfs.mfs fixup
For the special case of crossbuilding minix on minix.
2013-04-03 15:57:04 +02:00
Lionel Sambuc f640210005 Removing obsolete _NBSD_LIBC define
Change-Id: Ia6ce84ccdf36cf6f64540b990baaa7d85c53533d
2013-02-26 09:44:24 +00:00
Lionel Sambuc f14fb60209 Libraries updates and cleanup
* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
2013-01-14 11:36:26 +01:00
Thomas Veerman ac7451d11b mkfs.mfs: __dead and __UNCONST are unknown on Linux
Including nbtool_config.h takes care of that deficiency when cross
compiling.
2012-11-26 16:18:32 +00:00
Thomas Veerman d9f4f71916 Implement dynamic mtab support
With this patch /etc/mtab becomes obsolete.
2012-11-26 15:20:18 +00:00
Ben Gras 77b6e2dcaa mkfs: support indirect blocks in directories 2012-11-07 23:16:42 +01:00
Ben Gras 6463554619 mkfs: move directory entry manipulation 2012-11-07 23:16:41 +01:00
Ben Gras 960c93c6f7 mkfs: drop support for zone != block 2012-11-07 23:16:40 +01:00
Ben Gras 9d9a90c118 mkfs: drop support for running on DOS 2012-11-07 23:16:39 +01:00
Ben Gras ca2255201b mkfs: separate inode retrieval function 2012-11-07 23:16:38 +01:00
Ben Gras ba468a6052 mkfs: drop support for creating non-v3 FSes 2012-11-07 23:16:37 +01:00
Ben Gras 253b6e965c mkfs: symlink support
. mkproto too
2012-11-07 23:16:18 +01:00
Ben Gras cf6fa5ad92 mkfs, mkproto: minor improvements
. mkfs: -x feature for extra space
	. rename manpage to mkfs.mfs.1 to follow the binary
	. move mkproto so it can become part of the tools easily
2012-11-07 23:15:52 +01:00
Mohamed Katri d21a633ffb mkfs.mfs: dynamically size image from proto 2012-10-12 15:13:43 +02:00
Kees Jongenburger 2af02e0d5d Amd64 cross-compilation fix.
* Remove usage of _MINIX and __i386__ in mkfs.c  to make
  conditional compilation orthogonal.
2012-08-27 15:31:03 +00:00
Arun Thomas 6723dcfab7 Replace MACHINE/CHIP macros with compiler macros 2012-08-06 17:49:22 +02:00
Thomas Veerman 4bb9af63c6 mkfs.mfs: no need to include a.out.h 2012-06-18 13:39:21 +00:00
Thomas Veerman bb226763a0 Make mkfs.mfs cross compilable 2012-06-18 10:54:54 +00:00
Renamed from commands/mkfs.mfs/mkfs.c (Browse further)