Commit Graph

46 Commits

Author SHA1 Message Date
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
martin 9286e800c1 Add a bit of swapping for values in CG descriptors (used to be done
wholesale in e2fs_cgsave, but now common code keeps them in FS byte
order). Seems to fix newfs_ext2fs on big endian hosts.
2016-09-05 10:44:36 +00:00
jdolecek 249e8f5f7e rename struct ext2fs_dinode attribute e2di_dacl to correct
e2di_size_high; even Linux ext2 filesystem code actually uses it
unconditionally this way and ext4 code finally also calls it that way
in their struct definition too; if there was any trace of this for other
purpose it's long gone
2016-08-04 17:43:47 +00:00
nonaka 95ec03a0f0 pass EXT2_DINODE_SIZE(&sblock) as isize to e2fs_isave(). 2016-08-04 03:01:38 +00:00
christos d3037dba83 fix error messages containing \n 2015-06-16 23:18:54 +00:00
christos f55ff5e8dd vax specific gcc 4.8.1 hacks 2013-11-09 21:39:27 +00:00
tsutsui 0148f33f56 Wrap long lines overflowed after EXT2_ prefix addtion to fs macro. 2013-10-19 13:42:10 +00:00
christos 3e4993b396 fix unused variable warnings. 2013-10-19 01:09:58 +00:00
dholland 6616a3c018 This passes WARNS=5. 2013-08-11 06:05:30 +00:00
dholland 2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
dholland f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +00:00
apb bf5fabe51d free(bbp) in error paths. Coverity CID 274748. 2013-02-07 11:00:59 +00:00
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
joerg 6d6a95294e Avoid non-literal format string. Raise WARNS to 4 and disable
sign warnings instead.
2012-03-24 08:22:24 +00:00
tsutsui 50ccec61ff Stop zero'ing all possible superblock backup leftovers conservatively.
Instead, explicitly zap only possible first backups and FFS superblocks.

Fixes "Extreamly slow newfs_ext2fs on 60Gb USB stick" problem
reported by Aleksey Cheusov on tech-kern@.
2012-03-06 15:39:41 +00:00
tsutsui b01393af8c Add a URL of Linux Documentation "The Second Extended Filesystem." 2010-09-10 15:51:20 +00:00
tsutsui 5b900f2697 Avoid line break in `Linux Ext2' strings. 2010-02-25 13:09:17 +00:00
wiz dcced1277c Fix string, noted by tsutsui. 2010-02-21 13:23:15 +00:00
wiz 380455a930 Fix pasto noted by tsutsui. 2010-02-18 13:49:19 +00:00
wiz 841db612d9 Various fixes from Jason McIntyre <jmc@kerhand.co.uk>. 2010-02-17 21:39:14 +00:00
pooka 3cf07ff872 Remove vinum-removal sentence fragment, similarly to newfs(8). 2009-12-01 08:47:25 +00:00
joerg 65828ca533 Use .%U. 2009-10-25 18:34:04 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
haad f5b48500f1 Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.

No objections on tech-userlevel@.
2009-06-05 21:52:31 +00:00
wiz a8df896a15 Sort option descriptions. 2009-05-18 12:17:54 +00:00
lukem ef685eeea9 Enable WARNS=4 by default except for:
dump  dump_lfs  fsck_ffs  fsck_lfs  fsdb  mount_smbfs
	newfs_ext2fs  newfs_lfs  resize_lfs  setkey
2009-04-11 07:58:11 +00:00
tsutsui 14c85750c6 Use inodesize to get offset of inode in one more place. 2009-03-02 10:57:03 +00:00
tsutsui 48c2d0ee71 Fix botched logic in inodesize check. 2009-03-02 10:38:13 +00:00
tsutsui 1b5cd43c66 Replace a magic number with a new EXT2_REV0_DINODE_SIZE macro. 2009-03-02 10:16:49 +00:00
tsutsui 8676336f2d - accept only EXT2_REV0_DINODE_SIZE inodesize on -O 0
- use inodesize to get offset of inode, not struct ext2fs_dinode array
2009-03-02 10:15:59 +00:00
wiz dcc33b5c39 Sort options in usage. 2009-03-01 21:54:31 +00:00
wiz 9ea4262fa9 New sentence, new line. 2009-03-01 21:52:59 +00:00
wiz 5d45b7ee8a Sort options. 2009-03-01 21:52:37 +00:00
christos 29055c6385 Support variable inode sizes. 2009-03-01 19:21:09 +00:00
tsutsui 00c798e9e3 Fix some spelling. 2008-08-28 16:29:24 +00:00
lukem 6543a91fea Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
tsutsui b87210fa51 Normalize my licenses. 2008-05-14 13:29:27 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
tsutsui ea9dd22af6 Don't allow blocksize larger than 4096 bytes as our kernel, fsck_ext2fs(8),
and Linux e2fsprogs.
2007-12-14 13:19:35 +00:00
tsutsui 3c4a86f736 Fix typo. 2007-12-09 17:39:51 +00:00
tsutsui 58babb9c75 Roundup e2fs_ipg to make it use whole inode table blocks since
it's still reasonable and some kernel code seems to assume it
(otherwise some inode numbers of directories could be corrupted).

XXX: not sure if odd e2fs_ipg is valid or not in ext2fs spec.
2007-11-21 13:14:06 +00:00
tsutsui ddd9ad0a5e Fix e2fs_itpg calculation. 2007-11-20 16:34:37 +00:00
tsutsui e2cf99a49a - fix a possible integer overflow
- initialize inode generation numbers with random numbers for NFS
  like newfs(8) as man page said
  XXX: sys/ufs/ext2fs/ext2fs_alloc.c:ext2fs_valloc() seems to override
       these generated numbers.
2007-11-19 15:11:50 +00:00
tsutsui 67c9d310f8 Several minor fixes:
- replace a magic number with a macro
- fix several printf format
- fix possble block sizes for zap_old_sblock()
- use err(3) rather than errx(3) + strerror(errno)
- fix a typo
- misc cosmetics
2007-11-18 07:11:39 +00:00
tsutsui f8b02b9cdf Add a dumb but BSD-licensed newfs_ext2fs(8) command.
This is based on the newfs(8) command for ffs, but
most ext2fs specific part is written from scratch.

Tested on alpha, cobalt, i386 and sgimips with some disks and vnd(4),
and at least cobalt's firmware can load boot files from an ext2fs
E2FS_REV0 partition created by this native newfs_ext2fs(8) command.

Closes PR bin/16175.
2007-11-17 16:50:25 +00:00