accept bigger PC BIOSes


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@946 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/vl.c b/vl.c
index fb073c2..b2ef506 100644
--- a/vl.c
+++ b/vl.c
@@ -291,6 +291,18 @@
 }
 
 /* return the size or -1 if error */
+int get_image_size(const char *filename)
+{
+    int fd, size;
+    fd = open(filename, O_RDONLY | O_BINARY);
+    if (fd < 0)
+        return -1;
+    size = lseek(fd, 0, SEEK_END);
+    close(fd);
+    return size;
+}
+
+/* return the size or -1 if error */
 int load_image(const char *filename, uint8_t *addr)
 {
     int fd, size;