Lines Matching refs:fnew
42 static char *fnew = NULL;
80 unlink (fnew);
86 // free (fnew);
377 fnew = malloc (fname_len + sizeof (".XXXXXX"));
378 if (fnew == NULL)
380 strcpy (mempcpy (fnew, fname, fname_len), ".XXXXXX");
382 fdnew = mkstemp (fnew);
386 fnew = argv[2];
387 fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS);
391 fail_errno ("couldn't create output file", fnew);
395 fail_elf ("couldn't open new ELF for writing", fnew);
399 fail_elf ("Couldn't create new ehdr", fnew);
402 fail_elf ("Couldn't get ehdr", fnew);
422 fail_elf ("Couldn't get section zero", fnew);
425 fail_elf ("Couldn't update section zero", fnew);
430 fail ("Couldn't update ehdr", fnew);
436 fail_elf ("Couldn't create phdrs", fnew);
445 fail_elf_idx ("Couldn't create phdr", fnew, cnt);
471 fail_elf_idx ("couldn't create new section", fnew, ndx);
499 fail_elf_idx ("Couldn't create new data for section", fnew, ndx);
547 fail_elf_idx ("Couldn't update symbol", fnew, i);
633 fail_elf_idx ("Couldn't update section header", fnew, ndx);
643 fail_elf ("Couldn't get ehdr", fnew);
653 fail_elf ("Couldn't update ehdr", fnew);
659 fail_elf ("Couldn't write ELF", fnew);
666 error (0, errno, "Couldn't fchmod %s", fnew);
668 error (0, errno, "Couldn't fchown %s", fnew);
672 if (rename (fnew, fname) != 0)
673 fail_errno ("rename", fnew);
678 free (fnew);
679 fnew = NULL;