Lines Matching defs:buf
125 static int mtdpstore_is_empty(struct mtdpstore_context *cxt, char *buf,
134 if (buf[i] != (char)0xFF)
274 static ssize_t mtdpstore_write(const char *buf, size_t size, loff_t off)
289 ret = mtd_write(cxt->mtd, off, size, &retlen, (u_char *)buf);
310 static ssize_t mtdpstore_read(char *buf, size_t size, loff_t off)
325 (u_char *)buf + done);
347 if (mtdpstore_is_empty(cxt, buf, size))
356 static ssize_t mtdpstore_panic_write(const char *buf, size_t size, loff_t off)
370 ret = mtd_panic_write(cxt->mtd, off, size, &retlen, (u_char *)buf);
448 u_char *buf;
453 buf = kmalloc(mtd->erasesize, GFP_KERNEL);
454 if (!buf)
458 ret = mtd_read(mtd, off, mtd->erasesize, &retlen, buf);
475 ret = mtd_write(mtd, off, zonesize, &retlen, buf);
486 kfree(buf);