- Timestamp:
- Sep 16, 2009 8:28:05 AM (15 years ago)
- Location:
- trunk/src/VBox/ImageMounter/VBoxFUSE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ImageMounter/VBoxFUSE/Makefile.kmk
r21129 r23052 54 54 $(LIB_RUNTIME) 55 55 VBoxFUSE_LIBS.darwin = fuse 56 VBoxFUSE_LIBS.linux = fuse 56 57 VBoxFUSE_LIBPATHS.darwin = /usr/local/lib 57 58 -
trunk/src/VBox/ImageMounter/VBoxFUSE/VBoxFUSE.cpp
r21129 r23052 27 27 #include <iprt/types.h> 28 28 29 #if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) 29 #if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) 30 30 # include <sys/param.h> 31 31 # undef PVM /* Blasted old BSD mess still hanging around darwin. */ … … 41 41 //# define EDOOFUS EXYZ 42 42 # else 43 # error "Choose an unlikely and (if possible) fun error number for EDOOFUS."43 # define EDOOFUS 0xfad8484d 44 44 # endif 45 45 #endif … … 338 338 pStat->st_blocks = (pNode->cbPrimary + DEV_BSIZE - 1) / DEV_BSIZE; 339 339 pStat->st_blksize = 0x1000; /* ignored */ 340 #ifndef RT_OS_LINUX 340 341 pStat->st_flags = 0; 341 342 pStat->st_gen = 0; 343 #endif 342 344 } 343 345 … … 520 522 */ 521 523 char *pszFormat; 522 rc = VDGetFormat( pszImage, &pszFormat);524 rc = VDGetFormat(NULL /* pVDIIfsDisk */, pszImage, &pszFormat); 523 525 if (RT_FAILURE(rc)) 524 526 { … … 1003 1005 if (pInfo->flags & (O_APPEND | O_NONBLOCK | O_SYMLINK | O_NOCTTY | O_SHLOCK | O_EXLOCK | O_ASYNC 1004 1006 | O_CREAT | O_TRUNC | O_EXCL | O_EVTONLY)) 1007 return -EINVAL; 1008 if ((pInfo->flags & O_ACCMODE) == O_ACCMODE) 1009 return -EINVAL; 1010 #elif defined(RT_OS_LINUX) 1011 if (pInfo->flags & ( O_APPEND | O_ASYNC | O_DIRECT /* | O_LARGEFILE ? */ 1012 | O_NOATIME | O_NOCTTY | O_NOFOLLOW | O_NONBLOCK 1013 /* | O_SYNC ? */)) 1005 1014 return -EINVAL; 1006 1015 if ((pInfo->flags & O_ACCMODE) == O_ACCMODE) … … 1152 1161 AssertReturn((unsigned)cbBuf == cbBuf, -EINVAL); 1153 1162 AssertReturn(offFile >= 0, -EINVAL); 1154 AssertReturn(offFile + cbBuf >= offFile, -EINVAL);1163 AssertReturn(offFile + (ssize_t)cbBuf >= offFile, -EINVAL); 1155 1164 1156 1165 PVBOXFUSENODE pNode = (PVBOXFUSENODE)(uintptr_t)pInfo->fh; … … 1168 1177 1169 1178 int rc; 1170 if (offFile + cbBuf < offFile)1179 if (offFile + (ssize_t)cbBuf < offFile) 1171 1180 rc = -EINVAL; 1172 1181 else if (offFile >= pFlatImage->Node.cbPrimary) … … 1177 1186 { 1178 1187 /* Adjust for EOF. */ 1179 if (offFile + cbBuf >= pFlatImage->Node.cbPrimary)1188 if (offFile + (ssize_t)cbBuf >= pFlatImage->Node.cbPrimary) 1180 1189 cbBuf = pFlatImage->Node.cbPrimary - offFile; 1181 1190
Note:
See TracChangeset
for help on using the changeset viewer.