Changeset 987
- Timestamp:
- 12/10/2006 21:55:06 (5 years ago)
- File:
-
- 1 edited
-
box/trunk/lib/raidfile/RaidFileRead.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/raidfile/RaidFileRead.cpp
r217 r987 15 15 #include <errno.h> 16 16 #include <sys/stat.h> 17 #include <sys/uio.h>18 #include <syslog.h>19 17 #include <stdarg.h> 20 #include <dirent.h> 18 19 #ifdef HAVE_SYS_UIO_H 20 #include <sys/uio.h> 21 #endif 22 23 #ifdef HAVE_SYSLOG_H 24 #include <syslog.h> 25 #endif 26 27 #ifdef HAVE_DIRENT_H 28 #include <dirent.h> 29 #endif 21 30 22 31 #include <stdio.h> … … 584 593 // Open the parity file 585 594 std::string parityFilename(RaidFileUtil::MakeRaidComponentName(rdiscSet, mFilename, (2 + startDisc) % READ_NUMBER_DISCS_REQUIRED)); 586 mParityHandle = ::open(parityFilename.c_str(), O_RDONLY, 0555); 595 mParityHandle = ::open(parityFilename.c_str(), 596 O_RDONLY | O_BINARY, 0555); 587 597 if(mParityHandle == -1) 588 598 { … … 1018 1028 1019 1029 // Attempt to open 1020 int osFileHandle = ::open(writeFilename.c_str(), O_RDONLY, 0); 1030 int osFileHandle = ::open(writeFilename.c_str(), 1031 O_RDONLY | O_BINARY, 0); 1021 1032 if(osFileHandle == -1) 1022 1033 { … … 1056 1067 { 1057 1068 // Open stripe1 1058 stripe1 = ::open(stripe1Filename.c_str(), O_RDONLY, 0555); 1069 stripe1 = ::open(stripe1Filename.c_str(), 1070 O_RDONLY | O_BINARY, 0555); 1059 1071 if(stripe1 == -1) 1060 1072 { … … 1062 1074 } 1063 1075 // Open stripe2 1064 stripe2 = ::open(stripe2Filename.c_str(), O_RDONLY, 0555); 1076 stripe2 = ::open(stripe2Filename.c_str(), 1077 O_RDONLY | O_BINARY, 0555); 1065 1078 if(stripe2 == -1) 1066 1079 { … … 1170 1183 if(existingFiles & RaidFileUtil::Stripe1Exists) 1171 1184 { 1172 stripe1 = ::open(stripe1Filename.c_str(), O_RDONLY, 0555); 1185 stripe1 = ::open(stripe1Filename.c_str(), 1186 O_RDONLY | O_BINARY, 0555); 1173 1187 if(stripe1 == -1) 1174 1188 { … … 1179 1193 if(existingFiles & RaidFileUtil::Stripe2Exists) 1180 1194 { 1181 stripe2 = ::open(stripe2Filename.c_str(), O_RDONLY, 0555); 1195 stripe2 = ::open(stripe2Filename.c_str(), 1196 O_RDONLY | O_BINARY, 0555); 1182 1197 if(stripe2 == -1) 1183 1198 { … … 1186 1201 } 1187 1202 // Open parity 1188 parity = ::open(parityFilename.c_str(), O_RDONLY, 0555); 1203 parity = ::open(parityFilename.c_str(), 1204 O_RDONLY | O_BINARY, 0555); 1189 1205 if(parity == -1) 1190 1206 {
Note: See TracChangeset
for help on using the changeset viewer.
