From 5d58fe0ea12c9c727c8a970c8e1ac08ea7fbe05f Mon Sep 17 00:00:00 2001 From: srs5694 Date: Sun, 3 Jan 2010 20:57:08 -0500 Subject: 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. --- mbr.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mbr.cc') 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) { -- cgit v1.2.1