mirror of
https://git.yoctoproject.org/poky
synced 2026-03-05 23:09:39 +01:00
update_to_1.95.patch was generated by making a diff bewteen the 1.4.1 release and the latest 1.9.5 version in the cvs repo: http://genext2fs.cvs.sourceforge.net/viewvc/genext2fs/genext2fs/genext2fs.c?revision=1.95 The patches 0001-0019 come from mailing list of genext2fs-devel http://sourceforge.net/mailarchive/forum.php?forum_name=genext2fs-devel&max_rows=100&style=flat&viewmonth=201106 (From OE-Core rev: 8f17e499cf91191727c8767e839738cb39c21655) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
31 lines
999 B
Diff
31 lines
999 B
Diff
Upstream-Status: inappropriate
|
|
|
|
From 33c92a0b663d16d2260b391d39aa745acd4b360e Mon Sep 17 00:00:00 2001
|
|
From: Corey Minyard <cminyard@mvista.com>
|
|
Date: Tue, 7 Jun 2011 07:23:23 -0500
|
|
Subject: [PATCH 17/19] Fix "file same" comparison
|
|
|
|
It's not enough to check the inode, you also have to check the device
|
|
to make sure a file is the same.
|
|
---
|
|
genext2fs.c | 3 ++-
|
|
1 files changed, 2 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/genext2fs.c b/genext2fs.c
|
|
index fc7fe5f..485393c 100644
|
|
--- a/genext2fs.c
|
|
+++ b/genext2fs.c
|
|
@@ -2359,7 +2359,8 @@ alloc_fs(int swapit, char *fname, uint32 nbblocks, FILE *srcfile)
|
|
perror_msg_and_die("fstat srcfile");
|
|
if (stat(fname, &dststat))
|
|
perror_msg_and_die("stat-ing %s", fname);
|
|
- if (srcstat.st_ino == dststat.st_ino) {
|
|
+ if (srcstat.st_ino == dststat.st_ino
|
|
+ && srcstat.st_dev == dststat.st_dev) {
|
|
// source and destination are the same file, don't
|
|
// truncate or copy, just use the file.
|
|
fs->f = fopen(fname, "r+b");
|
|
--
|
|
1.7.4.1
|
|
|