MCPcopy Create free account
hub / github.com/coreboot/coreboot / do_file

Function do_file

util/cbfstool/amdcompress.c:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static int do_file(char *name, size_t *size, int oflag)
62{
63 struct stat fd_stat;
64 int fd;
65
66 fd = open(name, oflag, 0666);
67 if (fd < 0)
68 return -1;
69
70 if (fstat(fd, &fd_stat)) {
71 close(fd);
72 return -1;
73 }
74
75 if (size)
76 *size = fd_stat.st_size;
77 return fd;
78}
79
80static int parse_elf_to_xip_ram(const struct buffer *input,
81 struct buffer *output)

Callers 2

do_processFunction · 0.85
do_uncompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected