summaryrefslogtreecommitdiffstats
path: root/fsck
Commit message (Collapse)AuthorAgeFilesLines
* fsck, checktty, flock: Use more portable includes.Josiah Worcester2011-06-141-1/+1
| | | | Signed-off-by: Josiah Worcester <josiahw@gmail.com>
* build-sys: don't support external (e2fsprogs) libblkidKarel Zak2011-03-161-5/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: fix clang compiler warningSami Kerola2011-03-081-5/+3Star
| | | | | | | | | | | fsck.c:874:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security] errx(EXIT_USAGE, _(fs_type_syntax_error)); ^~~~~~~~~~~~~~~~~~~~~~~ The issue was introduced in my commit 0a09eb4e, sorry. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck: fix -C parsingKarel Zak2011-02-171-1/+1
| | | | | Reported-by: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: use xmalloc, warn & err and new usageSami Kerola2011-02-161-91/+87Star
| | | | | | | | | | | | | | | | | | | | | All compler errors reported by -Wall -Wextra -pedantic are fixed. The patch also makes fsck to use xalloc instead of it's own malloc. That will make fsck to exit, which could be good thing, at sections where it previously did not. Almost all print outs where touched, where various printfs where converted to warn or err messages. Finally theres a fix to counter wrap bug that could (very unlikely) manifest itself if an user specifies same flag exactly UINT_MAX times. [kzak@redhat.com: - coding style - define XALLOC_EXIT_CODE - use verbose++ in main()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: include c.h, fallback for PATH_MAXKarel Zak2011-02-071-0/+1
| | | | | Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: returns proper code on exec() errorKarel Zak2010-12-271-4/+6
| | | | | | | | | | | | | | | | | # fsck -t foo /dev/sda1; echo $? fsck: fsck.foo: not found /sbin/fsck: Error 2 while executing fsck.foo for /dev/sda1 0 new version: # fsck -t foo /dev/sda1; echo $? fsck: fsck.foo: not found fsck: Error 2 while executing fsck.foo for /dev/sda1 8 Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=619139 Signed-off-by: Karel Zak <kzak@redhat.com>
* rename util-linux-ng back to util-linuxKarel Zak2010-11-301-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: add support for whole-disk locking (-l option)Karel Zak2010-10-263-10/+123
| | | | | | | | | | | | | | | | | This feature allows to call multiple independent fsck instances rather than use only one "fsck -A" process. The lock uses LOCK_EX flock(2). The lock request is ignored if the whole-disk is non-rotating disk. The verbose mode (-V) provides information about disk locking. Note that "fsck -l" does not care if the device is stacked, for example if you want to call "fsck -l /dev/md0" and "fsck -l /dev/md1" then the underlying devices will not be locked. The traditional "fsck -A" does not run in parallel for stacked devices. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: inform about nonexistent devices in verbose modeKarel Zak2010-10-071-3/+10
| | | | | Reported-by: Serafeim Zanikolas <sez@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: improve whole-disk check, detect stacked devicesKarel Zak2010-08-195-203/+75Star
| | | | | | | | | | | | | | | | The current heuristic for conversion from partition to whole-disk is based on device names. It's pretty poor. This patch replaces this code with blkid_devno_to_wholedisk(). This solution is based on /sys FS and it works for arbitrary partitioned devices. The another problem is the way how fsck determines stacked devices. The current code checks device name for "md" prefix only. It does not care about DM, dm-ccypt, and so on. This patch uses /sys/block/.../slaves/, but it does not fully resolves dependencies between all devices. The method is simple -- fsck does not check stacked devices in parallel with any other device. Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: fix typo in fsck.8Francesco Cosoleto2010-06-301-1/+1
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* build-sys: replace ../ with $top_srcdirKarel Zak2010-05-241-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove duplicate #includesKarel Zak2010-02-121-1/+0Star
| | | | | | | | | | | $ make checkincludes fsck/fsck.c: errno.h is included more than once. lib/canonicalize.c: string.h is included more than once. shlibs/blkid/src/blkidP.h: stdio.h is included more than once. shlibs/blkid/src/devname.c: string.h is included more than once. shlibs/blkid/src/devno.c: string.h is included more than once. Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck/mkfs/mount: unify default search paths for helpersMike Frysinger2010-02-021-1/+1
| | | | | | | | | | | | Rather than each fs util having its own search policy, unify the paths in configure and allow them to be tweaked by downstream. In the process, drop the /etc paths as no one has ever really used these. [kzak@redhat.com: - backport to autoconf < 2.64 (remove AS_{SET,IF,CASE,APPEND} macros)] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: document fsck behavior wrt nofail option and fstype 'auto'Ludwig Nussel2009-12-011-0/+16
|
* fsck: honor nofail option in fsckLudwig Nussel2009-12-011-0/+25
| | | | | | | | | analog to mount gracefully ignoring non existing devices if the "nofail" option is specified in fstab, also have fsck -A skip them. This way it's possible to have devices optionally not available during boot but still have them fsck'd if they are there. Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
* build-sys: cleanup AM_CFLAGS usageKarel Zak2009-11-091-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix out-of-source buildKarel Zak2009-11-061-1/+1
| | | | | | The blkid.h file is generated and stored in $top_builddir. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: detect if const is availableGuillem Jover2009-10-091-1/+0Star
| | | | | | | | Some systems define __STDC__ and do not have a working const, some do not define the macro but do have a working const. Use AC_C_CONST to check for its presence. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* fsck.8: formattingPeter Breitenlohner2009-08-171-95/+86Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* mount: (and fsck) remove libvolume_id supportKarel Zak2009-05-221-7/+0Star
| | | | | | | The libvolume_id is deprecated in favor of libblkid. The libblkid from u-l-ng provides the same functionality as libvolume_id. Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: remove useless if-before-free testsKarel Zak2009-02-241-8/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: remove \007 from warning messageKarel Zak2009-02-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add fsck binary to .gitignoreKarel Zak2009-02-181-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: cosmetic changes (NLS, paths, ...)Karel Zak2009-02-181-8/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: link with generic fsprobe wrapperKarel Zak2009-02-182-8/+18
| | | | | | | This is a way how link fsck with libblkid (e2sprogs or util-linxu-ng version) and libvolume_id. Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: move fsck from e2fsprogs to util-linux-ngKarel Zak2009-02-185-0/+1998
Signed-off-by: Karel Zak <kzak@redhat.com>