Lines Matching defs:tmp_stat
106 struct stat tmp_stat;
149 if (fstat(fd, &tmp_stat)) {
154 if ((tmp_stat.st_size + sizeof(confmtd_hdr_t)) > mtd_info.size || tmp_stat.st_size == 0) {
160 if ((tmp_buf = malloc(tmp_stat.st_size)) == NULL) {
165 if ((buf = malloc(tmp_stat.st_size + sizeof(confmtd_hdr_t))) == NULL) {
170 if (read(fd, tmp_buf, tmp_stat.st_size) != tmp_stat.st_size) {
181 mtd_hdr.len = tmp_stat.st_size;
182 mtd_hdr.checksum = confmtd_checksum(tmp_buf, tmp_stat.st_size);
185 memcpy((buf + sizeof(confmtd_hdr_t)), tmp_buf, tmp_stat.st_size);
190 write(mtd_fd, buf, (sizeof(confmtd_hdr_t) + tmp_stat.st_size)) !=
191 (sizeof(confmtd_hdr_t) + tmp_stat.st_size)) {
234 struct stat tmp_stat;
245 if (stat(NAND_FILE, &tmp_stat)) {