Displaying 1 result from an estimated 1 matches for "fd_table".
Did you mean:
  id_table
  
2002 Jun 26
1
using block devices as harddisks
...bochs-1.4/iodev/harddrv.cc  Wed Jun 26 09:42:51 2002
@@ -2779,6 +2779,20 @@
     if (ret) {
          BX_PANIC(("fstat() returns error!"));
     }
+    if (S_ISBLK(stat_buf.st_mode))
+    {
+/* it's a block device. st_size will be 0, so set it to the correct size. */
+      if (ioctl(fd_table[i],BLKGETSIZE,&(stat_buf.st_size))==-1)
+        BX_PANIC(("size of block device %s can't be read",pathname));
+      if (stat_buf.st_size > (0x7ffffff/512))
+      {
+       BX_ERROR(("size of disk image is too big, rounded down"));
+        stat_buf.st_size=0x7ffffe...