X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fmisc%2Fbochs-2.6.2-block-device-check.patch;fp=src%2Fmisc%2Fbochs-2.6.2-block-device-check.patch;h=a0b930ce86988c9ef64c1e53bb0b3272473163ce;hp=0000000000000000000000000000000000000000;hb=a8586578bb7a9dbbbca7b39a9f92058e3f551f9d;hpb=bd5dde3034714da175496292c92dc5a37509a311 diff --git a/src/misc/bochs-2.6.2-block-device-check.patch b/src/misc/bochs-2.6.2-block-device-check.patch new file mode 100644 index 0000000..a0b930c --- /dev/null +++ b/src/misc/bochs-2.6.2-block-device-check.patch @@ -0,0 +1,12 @@ +diff -Naur bochs-2.6.2/iodev/hdimage/hdimage.cc bochs-2.6.2.new/iodev/hdimage/hdimage.cc +--- bochs-2.6.2/iodev/hdimage/hdimage.cc 2013-03-08 10:25:32.000000001 -0800 ++++ bochs-2.6.2.new/iodev/hdimage/hdimage.cc 2014-01-10 06:54:24.000000001 -0800 +@@ -200,7 +200,7 @@ + return -1; + } + #ifdef linux +- if (stat_buf.st_rdev) { // Is this a special device file (e.g. /dev/sde) ? ++ if (S_ISBLK(stat_buf.st_mode)) { // Is this a special device file (e.g. /dev/sde) ? + ioctl(fd, BLKGETSIZE64, fsize); // yes it's! + } + else