Lines Matching refs:buffer
104 char buffer[1024]; in get_start_end() local
111 while (fgets(buffer, 1024, map)) { in get_start_end()
112 if (start_line(buffer)) in get_start_end()
113 *start = strtoul(buffer, NULL, 16); in get_start_end()
114 else if (end_line(buffer)) in get_start_end()
115 *end = strtoul(buffer, NULL, 16); in get_start_end()
137 char buffer[BUFSIZE]; in get_hdrs_offset() local
143 if (read(kernelfd, buffer, BUFSIZE) != BUFSIZE) in get_hdrs_offset()
146 if (buffer[40] == 'H' && buffer[41] == 'd' && in get_hdrs_offset()
147 buffer[42] == 'r' && buffer[43] == 'S') { in get_hdrs_offset()
152 offset = ld2(buffer + AOUT_TEXT_OFFSET + 2) << 2; in get_hdrs_offset()
163 if (read(kernelfd, buffer, BUFSIZE) != BUFSIZE) in get_hdrs_offset()
167 if (buffer[i + 0] == 'H' && buffer[i + 1] == 'd' && in get_hdrs_offset()
168 buffer[i + 2] == 'r' && buffer[i + 3] == 'S') { in get_hdrs_offset()
180 char buffer[1024]; in main() local
200 if (read(image, buffer, 512) != 512) in main()
202 if (memcmp(buffer, aout_magic, 4) != 0) { in main()
228 st4(buffer, 0); in main()
229 st4(buffer + 4, 0x01000000); in main()
230 st4(buffer + 8, align(end + 32)); in main()
231 st4(buffer + 12, s.st_size); in main()
233 if (write(image, buffer + 2, 14) != 14) in main()
242 st4(buffer, align(end + 32 + 8191) - (start & ~0x3fffffUL) + in main()
245 st4(buffer + 4, 0); in main()
247 st4(buffer + 8, 0); in main()
248 if (write(image, buffer, 12) != 12) in main()
257 while ((i = read(tail, buffer, 1024)) > 0) in main()
258 if (write(image, buffer, i) != i) in main()