Lines Matching refs:fname
164 static void *mmap_file(char const *fname) in mmap_file() argument
174 fd_map = open(fname, O_RDONLY); in mmap_file()
176 perror(fname); in mmap_file()
180 perror(fname); in mmap_file()
184 fprintf(stderr, "not a regular file: %s\n", fname); in mmap_file()
193 perror(fname); in mmap_file()
197 perror(fname); in mmap_file()
317 static int write_file(const char *fname) in write_file() argument
319 char tmp_file[strlen(fname) + 4]; in write_file()
325 sprintf(tmp_file, "%s.rc", fname); in write_file()
334 perror(fname); in write_file()
352 if (rename(tmp_file, fname) < 0) { in write_file()
353 perror(fname); in write_file()
477 static int do_file(char const *const fname) in do_file() argument
483 ehdr = mmap_file(fname); in do_file()
494 ehdr->e_ident[EI_DATA], fname); in do_file()
526 fprintf(stderr, "unrecognized ET_REL file %s\n", fname); in do_file()
534 w2(ehdr->e_machine), fname); in do_file()
579 ehdr->e_ident[EI_CLASS], fname); in do_file()
585 "unrecognized ET_REL file: %s\n", fname); in do_file()
592 if (do32(ehdr, fname, reltype) < 0) in do_file()
600 "unrecognized ET_REL file: %s\n", fname); in do_file()
613 if (do64(ghdr, fname, reltype) < 0) in do_file()
619 rc = write_file(fname); in do_file()