one minor nit

On Fri, Aug 19, 2011 at 8:00 AM, Stefan Tauner <stefan.tauner@student.tuwien.ac.at> wrote:
+static int read_content_from_file(romlayout_t *entry, uint8_t *newcontents)
+{
+       char *file;
+       FILE *fp;
+       int len;
+
+       file = entry->file;
+       len = entry->end - entry->start + 1;
+       if (file[0] != '\0') {
+               int numbytes;
+               if ((fp = fopen(file, "rb")) == NULL) {
+                       perror(file);

Hmmmm, I'm not sure why we used perror()... Perhaps it would be better to use msg_gerr(strerror(errno))?
 
+                       return 1;
+               }
+               numbytes = fread(newcontents + entry->start, 1, len, fp);
+               fclose(fp);
+               if (numbytes != len) {
+                       perror(file);

same as above.

--
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.