Lines Matching refs:len
76 read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len))
80 grub_off_t ofs, len;
98 grub_size_t len;
100 len = (leng > BUF_SIZE) ? BUF_SIZE : leng;
102 if (grub_disk_read (dev->disk, 0, skip, len, buf))
104 skip, len);
106 if (hook (skip, buf, len))
109 skip += len;
110 leng -= len;
136 len = file->size - skip;
137 if ((leng) && (leng < len))
138 len = leng;
142 while (len)
146 sz = grub_file_read (file, buf, (len > BUF_SIZE) ? BUF_SIZE : len);
158 len -= sz;
169 auto int cp_hook (grub_off_t ofs, char *buf, int len);
170 int cp_hook (grub_off_t ofs, char *buf, int len)
174 if ((int) fwrite (buf, 1, len, ff) != len)
197 auto int cat_hook (grub_off_t ofs, char *buf, int len);
198 int cat_hook (grub_off_t ofs, char *buf, int len)
202 if ((int) fwrite (buf, 1, len, stdout) != len)
220 auto int cmp_hook (grub_off_t ofs, char *buf, int len);
221 int cmp_hook (grub_off_t ofs, char *buf, int len)
223 if ((int) fread (buf_1, 1, len, ff) != len)
229 if (grub_memcmp (buf, buf_1, len))
233 for (i = 0; i < len; i++, ofs++)
269 auto int hex_hook (grub_off_t ofs, char *buf, int len);
270 int hex_hook (grub_off_t ofs, char *buf, int len)
272 hexdump (ofs, buf, len);
285 auto int crc_hook (grub_off_t ofs, char *buf, int len);
286 int crc_hook (grub_off_t ofs, char *buf, int len)
290 GRUB_MD_CRC32->write(crc32_context, buf, len);