Searched refs:mtd_fd (Results 1 - 3 of 3) sorted by relevance

/netgear-R7000-V1.0.7.12_1.2.5/src/router/shared/
H A Dwapi_utils.c102 int mtd_fd = -1; local
113 if ((mtd_fd = wapi_mtd_open("wapi", O_RDWR)) < 0 ||
114 ioctl(mtd_fd, MEMGETINFO, &mtd_info) != 0) {
159 (void) ioctl(mtd_fd, MEMUNLOCK, &erase_info);
160 if (ioctl(mtd_fd, MEMERASE, &erase_info) != 0 ||
161 write(mtd_fd, &mtd_hdr, sizeof(wapi_mtd_hdr_t)) != sizeof(wapi_mtd_hdr_t) ||
162 write(mtd_fd, buf, tmp_stat.st_size) != tmp_stat.st_size) {
176 if (mtd_fd >= 0)
177 close(mtd_fd);
196 int mtd_fd local
[all...]
H A Dconfmtd_utils.c103 int mtd_fd = -1; local
133 if ((mtd_fd = confmtd_open("confmtd", O_RDWR)) < 0 ||
134 ioctl(mtd_fd, MEMGETINFO, &mtd_info) != 0) {
188 (void) ioctl(mtd_fd, MEMUNLOCK, &erase_info);
189 if (ioctl(mtd_fd, MEMERASE, &erase_info) != 0 ||
190 write(mtd_fd, buf, (sizeof(confmtd_hdr_t) + tmp_stat.st_size)) !=
206 if (mtd_fd >= 0)
207 close(mtd_fd);
229 int mtd_fd = -1; local
258 if ((mtd_fd
[all...]
/netgear-R7000-V1.0.7.12_1.2.5/src/router/rc/
H A Dmtd.c86 int mtd_fd; local
93 if ((mtd_fd = mtd_open(mtd, O_RDWR)) < 0) {
99 if (ioctl(mtd_fd, MEMGETINFO, &mtd_info) != 0) {
101 close(mtd_fd);
115 (void) ioctl(mtd_fd, MEMUNLOCK, &erase_info);
116 if (ioctl(mtd_fd, MEMERASE, &erase_info) != 0) {
121 //close(mtd_fd);
130 close(mtd_fd);
145 int mtd_fd = -1; local
169 if ((mtd_fd
[all...]

Completed in 27 milliseconds