summaryrefslogtreecommitdiff
path: root/mbr.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2010-01-03 20:57:08 -0500
committersrs5694 <srs5694@users.sourceforge.net>2010-01-03 20:57:08 -0500
commit5d58fe0ea12c9c727c8a970c8e1ac08ea7fbe05f (patch)
tree56f8e7514b233fa9b7d0cba24115ffc616e81d66 /mbr.cc
parent1d1448a82d62ad32a8d597ed9ade46b4f37d8eb5 (diff)
downloadsgdisk-5d58fe0ea12c9c727c8a970c8e1ac08ea7fbe05f.tar.gz
Version 0.5.3 changes. Minor bug fixes & detection of the number of
logical sectors per physical sector on Linux 2.6.32 and above.
Diffstat (limited to 'mbr.cc')
-rw-r--r--mbr.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbr.cc b/mbr.cc
index 2be731b..e06d821 100644
--- a/mbr.cc
+++ b/mbr.cc
@@ -289,7 +289,9 @@ void MBRData::WriteMBRData(int fd) {
// Now write that data structure...
lseek64(fd, 0, SEEK_SET);
- write(fd, &tempMBR, 512);
+ if (write(fd, &tempMBR, 512) != 512) {
+ fprintf(stderr, "Warning! Error %d when saving MBR!\n", errno);
+ } // if
// Reverse the byte order back, if necessary
if (IsLittleEndian() == 0) {