1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

package/mtd: add fixtrx command

* patch by Bernhard Loos
 * note: trailing whitespaces are removed


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20524 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg
2010-03-27 17:38:33 +00:00
parent 60d74152dd
commit 07f362a34d
2 changed files with 110 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
/*
* trx.c
*
* Copyright (C) 2005 Mike Baker
* Copyright (C) 2005 Mike Baker
* Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
*
* This program is free software; you can redistribute it and/or
@@ -75,7 +75,6 @@ trx_fixup(int fd, const char *name)
goto err;
}
init_crc32();
scan = ptr + offsetof(struct trx_header, flag_version);
trx->crc32 = crc32buf(scan, trx->len - (scan - ptr));
msync(ptr, sizeof(struct trx_header), MS_SYNC|MS_INVALIDATE);