[U-Boot] [PATCH] FAT on non standard sector size devices
Wolfgang Denk
wd at denx.de
Wed Nov 12 23:01:31 CET 2008
Dear Igor Luri,
In message <1226507458.6038.70.camel at ilurilinux> you wrote:
> SGkgYWxsIQoKSSBoYXZlIGRvbmUgc29tZSBjaGFuZ2VzIHN1Z2VzdGVkIGJ5IFJlbXkgQm9obWUg
> YW5kIGZpbmFsbHkgdGhlCmZvbGxvd2luZyBwYXRjaCBhZGRzIEZBVCBzdXBwb3J0IG9uIGRldmlj
> ZXMgb2YgQU5ZIHNlY3RvciBzaXplLgoKSSBoYXZlIG9ubHkgdGVzdGVkIG9uIG91ciBjdXN0b20g
> Ym9hcmQgd2l0aCB1LWJvb3QgMS4xLjYgdmVyc2lvbi4gSQp3b3VsZCBhcHByZWNpYXRlIGlmIHNv
> bWVvbmUgY291bGQgdGVzdCB0aGlzIHBhdGNoIG9uIGxhdGVzdCB2ZXJzaW9uLgoKVGhhbmtzLgoK
> U2lnbmVkLW9mZi1ieTogSWdvciBMdXJpIDxpbHVyaUBhb3Rlay5lcz4KCmRpZmYgLS1naXQgYS9p
> bmNsdWRlL2ZhdC5oIGIvaW5jbHVkZS9mYXQuaAppbmRleCA1OWRlM2ZiLi5kYWQyZTNkIDEwMDY0
> NAotLS0gYS9pbmNsdWRlL2ZhdC5oCisrKyBiL2luY2x1ZGUvZmF0LmgKQEAgLTMxLDIwICszMSwx
> MiBAQAogCiAjZGVmaW5lIENPTkZJR19TVVBQT1JUX1ZGQVQKIAotI2RlZmluZSBTRUNUT1JfU0la
> RSBGU19CTE9DS19TSVpFCi0KLSNkZWZpbmUgRlNfQkxPQ0tfU0laRSA1MTIKLQotI2lmIEZTX0JM
> T0NLX1NJWkUgIT0gU0VDVE9SX1NJWkUKLSNlcnJvciBGU19CTE9DS19TSVpFICE9IFNFQ1RPUl9T
> SVpFIC0gVGhpcyBjb2RlIG5lZWRzIHRvIGJlIGZpeGVkIQotI2VuZGlmCi0KICNkZWZpbmUgTUFY
> X0NMV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wgYnVmZmVyLCBtYXhzaXpl
> KTsKICAgICBGQVRfRFBSSU5UICgiU2l6ZTogJWQsIGdvdDogJWxkXG4iLCBGQVQyQ1BVMzIgKGRl
> bnRwdHItPnNpemUpLApyZXQpOwotCisgICAgZnJlZShteWRhdGEtPmZhdGJ1Zik7CiAgICAgcmV0
> dXJuIHJldDsKIH0KIAoKCgoKLS0gCklnb3IgTHVyaQpSJkQgU29mdHdhcmUgRGVwYXJ0bWVudApG
> YWdvciBBb3RlayBTLiBDb29wLgpQLiBPLiBCb3ggMTQ0CkUtMjA1MDAgTW9uZHJhZ8Ozbi1BcnJh
> c2F0ZQpUZWwuICAgICsrMzQgOTQzIDcxIDkyIDAwIAogICAgICAgICsrMzQgOTQzIDcxIDkyIDAx
> IChFeHQuIDQ0MjY4KQpGYXguICAgICsrMzQgOTQzIDc5IDkyIDAzCnd3dy5hb3Rlay5lcwpfX19f
> X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpVLUJvb3QgbWFpbGlu
> ZyBsaXN0ClUtQm9vdEBsaXN0cy5kZW54LmRlCmh0dHA6Ly9saXN0cy5kZW54LmRlL21haWxtYW4v
> bGlzdGluZm8vdS1ib290Cg==
>
Please do not send base 64 encoded messages.
Please do not send HTML messages.
Please send plain text only.
Message unreadable, ignored. Sorry.
More information about the U-Boot
mailing list