Lines Matching refs:fname
321 char *fname; in os_dirent_ls() local
333 fname = malloc(len); in os_dirent_ls()
334 if (!fname) { in os_dirent_ls()
349 fname = realloc(fname, len); in os_dirent_ls()
351 if (!next || !fname) { in os_dirent_ls()
373 snprintf(fname, len, "%s/%s", dirname, next->name); in os_dirent_ls()
374 if (!stat(fname, &buf)) in os_dirent_ls()
385 free(fname); in os_dirent_ls()
404 int os_get_filesize(const char *fname, loff_t *size) in os_get_filesize() argument
409 ret = stat(fname, &buf); in os_get_filesize()
416 int os_write_ram_buf(const char *fname) in os_write_ram_buf() argument
421 fd = open(fname, O_CREAT | O_WRONLY, 0777); in os_write_ram_buf()
432 int os_read_ram_buf(const char *fname) in os_read_ram_buf() argument
438 ret = os_get_filesize(fname, &size); in os_read_ram_buf()
443 fd = open(fname, O_RDONLY); in os_read_ram_buf()
455 static int make_exec(char *fname, const void *data, int size) in make_exec() argument
459 strcpy(fname, "/tmp/u-boot.jump.XXXXXX"); in make_exec()
460 fd = mkstemp(fname); in make_exec()
466 if (chmod(fname, 0777)) in make_exec()
496 char fname[30], mem_fname[30]; in os_jump_to_image() local
504 err = make_exec(fname, dest, size); in os_jump_to_image()
520 extra_args[1] = fname; in os_jump_to_image()
537 err = execv(fname, argv); in os_jump_to_image()
542 return unlink(fname); in os_jump_to_image()
545 int os_find_u_boot(char *fname, int maxlen) in os_find_u_boot() argument
557 strcpy(fname, progname); in os_find_u_boot()
558 if (!strcmp(fname + len - 4, "-spl")) { in os_find_u_boot()
559 fname[len - 4] = '\0'; in os_find_u_boot()
560 fd = os_open(fname, O_RDONLY); in os_find_u_boot()
568 p = strstr(fname, "/spl/"); in os_find_u_boot()
571 fd = os_open(fname, O_RDONLY); in os_find_u_boot()
581 int os_spl_to_uboot(const char *fname) in os_spl_to_uboot() argument
588 argv[0] = (char *)fname; in os_spl_to_uboot()
589 ret = execv(fname, argv); in os_spl_to_uboot()
593 return unlink(fname); in os_spl_to_uboot()