Patches to make Bochs 2.6.2 work with Pintos
[pintos-anon] / src / misc / bochs-2.6.2-block-device-check.patch
1 diff -Naur bochs-2.6.2/iodev/hdimage/hdimage.cc bochs-2.6.2.new/iodev/hdimage/hdimage.cc
2 --- bochs-2.6.2/iodev/hdimage/hdimage.cc        2013-03-08 10:25:32.000000001 -0800
3 +++ bochs-2.6.2.new/iodev/hdimage/hdimage.cc    2014-01-10 06:54:24.000000001 -0800
4 @@ -200,7 +200,7 @@
5        return -1;
6      }
7  #ifdef linux
8 -    if (stat_buf.st_rdev) { // Is this a special device file (e.g. /dev/sde) ?
9 +    if (S_ISBLK(stat_buf.st_mode)) { // Is this a special device file (e.g. /dev/sde) ?
10        ioctl(fd, BLKGETSIZE64, fsize); // yes it's!
11      }
12      else