public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Leo Barnes <barnes.leo@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mkfs.ubifs gives corrupt images/crc errors
Date: Thu, 02 Sep 2010 20:40:53 +0300	[thread overview]
Message-ID: <1283449253.1694.5.camel@brekeke> (raw)
In-Reply-To: <AANLkTi=XuMVcfBLnyUAKN7WcBDnH0eH+J5Dcy28ZkEJ5@mail.gmail.com>

On Thu, 2010-09-02 at 19:28 +0200, Leo Barnes wrote:
> Sorry for not answering earlier, I was on vacation without internet
> access. I have not tested the absolutely latest commits, but I have
> now identified the problem.
> 
> In commit 2d40ed7b415bcb6a358c9f221160c4a419f01f19, the
> crc-calculation function changed from being an inline function to a
> linked function called crc32. There already exists a crc32 function
> with the same arguments in ZLIB, which does not seem to give the same
> checksums as the mtd-utils crc-function. After the mentioned commit,
> mkfs.ubifs seems to use the ZLIB crc32-function instead of the
> mtd-utils version which is what gives the faulty checksums.
> 
> I managed to fix this in two simple ways:
> 1. Change the order of linking in the makefile so that libmtd comes
> before libz. This might possibly break ZLIB (I have not tried this
> when using ZLIB).
> 2. Change the name of the mtd-utils crc32 function.
> 
> Changing the name of the function is probably the preferred option.

Right, another guy reported the same issue a couple of days ago and I
fixed this.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

      reply	other threads:[~2010-09-02 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  7:03 mkfs.ubifs gives corrupt images/crc errors Leo Barnes
2010-07-27 13:39 ` Artem Bityutskiy
2010-07-28  8:57   ` Leo Barnes
2010-07-28 12:15     ` Joakim Tjernlund
2010-08-22  8:22 ` Artem Bityutskiy
2010-09-02 17:28   ` Leo Barnes
2010-09-02 17:40     ` Artem Bityutskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283449253.1694.5.camel@brekeke \
    --to=dedekind1@gmail.com \
    --cc=barnes.leo@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox