]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/ifdtool.c
sniper: Pass serial number through ATAG
[karo-tx-uboot.git] / tools / ifdtool.c
index 590ccc914b064ec639b1dd79bc22b7ccd2a9edf7..df166161f439f7fe66d2f9f2675298e2785bb20f 100644 (file)
@@ -462,7 +462,7 @@ static int write_regions(char *image, int size)
                if (ret)
                        return ret;
                dump_region(i, frba);
-               if (region.size == 0)
+               if (region.size <= 0)
                        continue;
                region_fd = open(region_filename(i),
                                 O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |
@@ -987,7 +987,7 @@ int main(int argc, char *argv[])
                                        print_usage(argv[0]);
                                        exit(EXIT_FAILURE);
                                }
-                               ifile->addr = strtol(optarg, NULL, 0);
+                               ifile->addr = strtoll(optarg, NULL, 0);
                                ifile->type = opt == 'f' ? IF_fdt :
                                        opt == 'U' ? IF_uboot : IF_normal;
                                if (ifile->type == IF_fdt)