summaryrefslogtreecommitdiff
path: root/misc/e2fuzz.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'maint' into nextTheodore Ts'o2021-01-231-1/+2
|\
| * Fix clang warningsTheodore Ts'o2021-01-231-1/+2
| | | | | | | | | | | | | | | | | | Clang gets unhappy when passing an unsigned char to string functions. For better or for worse we use __u8[] in the definition of the superblock. So cast them these to "char *" to prevent clang build-time warnings. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* | Enable threaded support for e2fsprogs' applications.Theodore Ts'o2021-01-211-2/+2
|/ | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Use ext2_loff_t instead of loff_tTheodore Ts'o2020-03-231-5/+5
| | | | | | | | | The loff_t type is a glibc'ism and is not fully portable. Use ext2_loff_t instead. Fixes: 382ed4a1c2b6 ("e2fsck: use proper types for variables") Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reported-by: Matthias Andree <matthias.andree@gmx.de>
* e2fsck: use proper types for variablesAndreas Dilger2020-02-291-4/+4
| | | | | | | | | | | | Use ext2_ino_t instead of ino_t for referencing inode numbers. Use loff_t for for file offsets, and dgrp_t for group numbers. Cast products to ssize_t before multiplication to avoid overflow. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Reviewed-by: Shilong Wang <wshilong@ddn.com> Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* misc: fix gcc -Wall complaintsTheodore Ts'o2016-06-021-2/+3
| | | | | | Especially when compiling for a 32-bit architecture. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* misc: cleanup gcc -Wall warningsTheodore Ts'o2015-07-131-10/+13
| | | | | | | Also change ext2fs_symlink() so that the target parameter is a const char *, thus promising that we will never change the incoming string. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fuzz: fix clang warningDarrick J. Wong2015-01-191-1/+1
| | | | | Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fuzz: fix pwrite64/pwrite usageDarrick J. Wong2014-08-241-3/+15
| | | | | | | | Select pwrite64 or pwrite depending on what autoconf finds. This makes e2fuzz find a suitable pwrite variant regardless of platform. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* misc: fix gcc warningsDarrick J. Wong2014-08-241-1/+2
| | | | | Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fuzz: fix build problems on macosx and i386 linuxDarrick J. Wong2014-08-101-8/+13
| | | | | | | | | Fix clang warnings about forgotten header files, dead code, and pwrite support on OS X. The unistd.h inclusion also fixes a parameter truncation bug on i386. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fuzz: fix fs handle cleanup when closing failsDarrick J. Wong2014-08-021-6/+3
| | | | | | | | | | Fix the handling of 'fs' when closing the FS fails so that we don't dereference a NULL pointer. Adapt to use ext2fs_close_free while we're at it. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Fixes-Coverity-Bug: 1229241 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fuzz: Create a tool to fuzz ext* filesystemsDarrick J. Wong2014-07-251-0/+352
Creates a program that fuzzes only the metadata blocks (or optionally all in-use blocks) of an ext* filesystem. There's also a script to automate fuzz testing of the kernel and e2fsck in a loop. [ Modified by tytso to add e2fuzz to the clean target ] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>