diff options
author | Benno Schulenberg | 2013-10-08 17:04:22 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-09 11:37:38 +0200 |
commit | 47481cbd01819a6f387f6a2537f8ff1e4449deb0 (patch) | |
tree | 6dfafa51f6b490e329021a3d3acd7b39e1acdfb6 /disk-utils/fsck.cramfs.c | |
parent | tests: use 'btrfs' rather than 'btrfsctl' (diff) | |
download | kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.tar.gz kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.tar.xz kernel-qcow2-util-linux-47481cbd01819a6f387f6a2537f8ff1e4449deb0.zip |
textual: standardize some "cannot read" and "seek failed" error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'disk-utils/fsck.cramfs.c')
-rw-r--r-- | disk-utils/fsck.cramfs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index 3c861d57d..cd23345e3 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -166,14 +166,14 @@ static void test_super(int *start, size_t * length) /* find superblock */ if (read(fd, &super, sizeof(super)) != sizeof(super)) - err(FSCK_EX_ERROR, _("read failed: %s"), filename); + err(FSCK_EX_ERROR, _("cannot read %s"), filename); if (get_superblock_endianness(super.magic) != -1) *start = 0; else if (*length >= (PAD_SIZE + sizeof(super))) { if (lseek(fd, PAD_SIZE, SEEK_SET) == (off_t) -1) - err(FSCK_EX_ERROR, _("seek failed: %s"), filename); + err(FSCK_EX_ERROR, _("seek on %s failed"), filename); if (read(fd, &super, sizeof(super)) != sizeof(super)) - err(FSCK_EX_ERROR, _("read failed: %s"), filename); + err(FSCK_EX_ERROR, _("cannot read %s"), filename); if (get_superblock_endianness(super.magic) != -1) *start = PAD_SIZE; else @@ -228,9 +228,9 @@ static void test_crc(int start) MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (buf != MAP_FAILED) { if (lseek(fd, 0, SEEK_SET) == (off_t) -1) - err(FSCK_EX_ERROR, _("seek failed: %s"), filename); + err(FSCK_EX_ERROR, _("seek on %s failed"), filename); if (read(fd, buf, super.size) < 0) - err(FSCK_EX_ERROR, _("read failed: %s"), filename); + err(FSCK_EX_ERROR, _("cannot read %s"), filename); } } if (buf != MAP_FAILED) { @@ -244,11 +244,11 @@ static void test_crc(int start) buf = xmalloc(4096); if (lseek(fd, start, SEEK_SET) == (off_t) -1) - err(FSCK_EX_ERROR, _("seek failed: %s"), filename); + err(FSCK_EX_ERROR, _("seek on %s failed"), filename); for (;;) { retval = read(fd, buf, 4096); if (retval < 0) - err(FSCK_EX_ERROR, _("read failed: %s"), filename); + err(FSCK_EX_ERROR, _("cannot read %s"), filename); else if (retval == 0) break; if (length == 0) |