From cd1ec1120f97557237b8f978de1aef7f399c8ef3 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 23 Oct 2009 18:05:37 +0200 Subject: Implement CRC checking in reverese mode --- mkubootenv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkubootenv.c b/mkubootenv.c index 4294b76..f8b0bbc 100644 --- a/mkubootenv.c +++ b/mkubootenv.c @@ -200,7 +200,10 @@ static void uboot_img_to_env(struct file *s, struct file *t) dbg("target image file (env): %s\n", t->name); dbg("target size: %zd\n", t->size); - /* TODO: check CRC */ + /* check CRC */ + crc = (uint32_t *) s->ptr; + if (*crc != crc32(0, s->ptr + CRC32_SIZE, s->size - CRC32_SIZE)) + warn("source image with bad CRC\n"); p = t->ptr; end = s->ptr + CRC32_SIZE + t->size; -- cgit v1.2.3-54-g00ecf 'cgit logo'/> index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/include/scsi/fcoe_sysfs.h
AgeCommit message (Expand)AuthorFilesLines