summaryrefslogtreecommitdiff
path: root/ubi-utils/src/nand2bin.c
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2008-08-25 11:21:48 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-25 14:38:02 +0300
commitd5184fdeff3bb18e4d5c5fe00a91bd473e4ed26f (patch)
tree37fdb342cfcc81da0ec03347efaef0fa1b51e3de /ubi-utils/src/nand2bin.c
parentc67a5c357443321dd252dceddb8e5304430e47c5 (diff)
ubi-utils: use 'stat(2)' instead of 'lstat(2)'
The UBI tools refuse to work with symlinks like '/dev/ubi/bootloader -> ../ubi0_2' because they use 'lstat(2)' and get information about the symlink but not about the device. This is unwanted and fixed by this patch. This patch renames 'struct stat stat' variables to 'st' to avoid compilation errors. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/nand2bin.c')
-rw-r--r--ubi-utils/src/nand2bin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubi-utils/src/nand2bin.c b/ubi-utils/src/nand2bin.c
index be62e30..93ba29f 100644
--- a/ubi-utils/src/nand2bin.c
+++ b/ubi-utils/src/nand2bin.c
@@ -456,7 +456,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (lstat(myargs.arg1, &file_info) != 0) {
+ if (stat(myargs.arg1, &file_info) != 0) {
perror("Cannot fetch file size from input file.\n");
exit(EXIT_FAILURE);
}