Patrick Georgi wrote: > 2. romcc uses open/read/close to read included files. For some > reason, read always returns 0 bytes, so that's an endless loop. I > kept the open/stat/close part, and replaced the read with fread > (and fopen/fclose to support it). > > This might be solved in a cleaner way.
Maybe you can use fdopen() to tur the fd into FILE * once size is known? When done, just fclose() is sufficient, close() is not needed (and will fail, since fclose() on fdopen()ed fds will close()). Confused yet? :) //Peter -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

