]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a comment to the OsSectorSize() function. (CVS 3710)
authordanielk1977 <danielk1977@noemail.net>
Fri, 23 Mar 2007 10:08:38 +0000 (10:08 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Fri, 23 Mar 2007 10:08:38 +0000 (10:08 +0000)
FossilOrigin-Name: 0fd9983a98d8d61654f252f1708a4d7232a96b53

manifest
manifest.uuid
src/os_common.h
src/os_os2.c
src/os_unix.c
src/os_win.c

index 5d7d2b99e0e09c2a774be47cb61cda75eaf0ee75..57de99d5626fc841b3354552c4a4282d7828680d 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sos_unix.c,\smake\sa\sdistinction\sbetween\spread()\sand\spread64().\s\sAdd\sa\snew\ncompile-time\smacro\sUSE_PREAD64\sto\sselect\sthe\slatter.\s(CVS\s3709)
-D 2007-03-22T15:22:06
+C Add\sa\scomment\sto\sthe\sOsSectorSize()\sfunction.\s(CVS\s3710)
+D 2007-03-23T10:08:39
 F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -77,14 +77,14 @@ F src/main.c af8922e0205cf618392de2836c9efad71786d0d6
 F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
 F src/os.c 6df3e9c23eaa982d3e66ef770ad2519de5dd4d97
 F src/os.h ec780b3561d0bb887d13f193a1a889872c44a236
-F src/os_common.h aa3ef56941dcaf480b6f055a615674fe4909edbc
-F src/os_os2.c 175101ffc2142c3fc7962ed7a171806f28f95363
+F src/os_common.h fdccdbedd7e13ef4cb7f9e33484244a27a6b4c4e
+F src/os_os2.c de7e1660c72493e177424dddf5130d70fb711752
 F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
-F src/os_unix.c f6c261661a4b88da679dfb45069a46680d8f18d3
+F src/os_unix.c 4642f23ed0c1ae0f1440db1d2b4231348af69360
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
-F src/os_win.c f3ca3e08167eb3382781b840e787809eccb626dc
+F src/os_win.c 1d1d0989b0f235751504292c2f28e81044be0d70
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
 F src/pager.c dec2b25851190ab2d5b7d44065fae625c566dda5
 F src/pager.h 9f6b5ef42c761deec8a9b1966b32e9a9dc89a631
@@ -437,7 +437,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P b078f09bffee5863d595d281f2ecd14e1c9ec727
-R 9457b72e4d50a7bf046bedc43327a3b4
-U drh
-Z 2f03d003f64477a1b374c8414bc90cbd
+P 177cd92910d01c97eb3133a59fad417edbb1aa92
+R a47ce4776623e0598aaf36f17e96e9f0
+U danielk1977
+Z 7cc396a55ca909ea4a46a72e6fbe0bfd
index 56654afcffe3b5ce886aae0bb4dff5235131c4ed..5909d31080ae0f53c3bd36a2ea84e1909180c56e 100644 (file)
@@ -1 +1 @@
-177cd92910d01c97eb3133a59fad417edbb1aa92
\ No newline at end of file
+0fd9983a98d8d61654f252f1708a4d7232a96b53
\ No newline at end of file
index 89bdeabe04bf9d85f225543a35f78bf3f1eca3ca..3b57fb230d2628c8d7aedecd55e7f05df7669ddd 100644 (file)
@@ -197,7 +197,4 @@ int sqlite3GenericAllocationSize(void *p){ return 0; }
 #ifndef PAGER_SECTOR_SIZE
 # define PAGER_SECTOR_SIZE 512
 #endif
-static int osGenericSectorSize(OsFile *id){
-  return PAGER_SECTOR_SIZE;
-}
 
index a2cade29f1401061eee1b3194ea7e9e751a6974a..a1ec421822e48abcbfd16bb31abd9d286ac9c405 100644 (file)
@@ -732,6 +732,20 @@ static int os2LockState( OsFile *id ){
   return ((os2File*)id)->locktype;
 }
 
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and it's journal file) that the sector size will be the
+** same for both.
+*/
+static int os2SectorSize(OsFile *id){
+  return PAGER_SECTOR_SIZE;
+}
+
 /*
 ** This vector defines all the methods that can operate on an OsFile
 ** for os2.
@@ -751,7 +765,7 @@ static const IoMethod sqlite3Os2IoMethod = {
   os2Unlock,
   os2LockState,
   os2CheckReservedLock,
-  osGenericSectorSize,
+  os2SectorSize,
 };
 
 /*
index dfbb9338cf0ada8ed5a5f89cc43efb7723785d1f..4f722b10d54d312c395a6d73a28d0010acfc3ad5 100644 (file)
@@ -2340,6 +2340,20 @@ static int unixLockState(OsFile *id){
   return ((unixFile*)id)->locktype;
 }
 
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and it's journal file) that the sector size will be the
+** same for both.
+*/
+static int unixSectorSize(OsFile *id){
+  return PAGER_SECTOR_SIZE;
+}
+
 /*
 ** This vector defines all the methods that can operate on an OsFile
 ** for unix.
@@ -2359,7 +2373,7 @@ static const IoMethod sqlite3UnixIoMethod = {
   unixUnlock,
   unixLockState,
   unixCheckReservedLock,
-  osGenericSectorSize,
+  unixSectorSize,
 };
 
 #ifdef SQLITE_ENABLE_LOCKING_STYLE
@@ -2382,7 +2396,7 @@ static const IoMethod sqlite3AFPLockingUnixIoMethod = {
     afpUnixUnlock,
     unixLockState,
     afpUnixCheckReservedLock,
-    osGenericSectorSize,
+    unixSectorSize,
 };
 
 /*
@@ -2404,7 +2418,7 @@ static const IoMethod sqlite3FlockLockingUnixIoMethod = {
     flockUnixUnlock,
     unixLockState,
     flockUnixCheckReservedLock,
-    osGenericSectorSize,
+    unixSectorSize,
 };
 
 /*
@@ -2426,7 +2440,7 @@ static const IoMethod sqlite3DotlockLockingUnixIoMethod = {
     dotlockUnixUnlock,
     unixLockState,
     dotlockUnixCheckReservedLock,
-    osGenericSectorSize,
+    unixSectorSize,
 };
 
 /*
@@ -2448,7 +2462,7 @@ static const IoMethod sqlite3NolockLockingUnixIoMethod = {
   nolockUnixUnlock,
   unixLockState,
   nolockUnixCheckReservedLock,
-  osGenericSectorSize,
+  unixSectorSize,
 };
 
 #endif /* SQLITE_ENABLE_LOCKING_STYLE */
index bc348bbc30855a684f741a1d9f3a5222bd1200b8..97354ac22cceea85e4ce65ee0973db7e1cf4a228 100644 (file)
@@ -1454,6 +1454,20 @@ static int winLockState(OsFile *id){
   return ((winFile*)id)->locktype;
 }
 
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and it's journal file) that the sector size will be the
+** same for both.
+*/
+static int winSectorSize(OsFile *id){
+  return PAGER_SECTOR_SIZE;
+}
+
 /*
 ** This vector defines all the methods that can operate on an OsFile
 ** for win32.
@@ -1473,7 +1487,7 @@ static const IoMethod sqlite3WinIoMethod = {
   winUnlock,
   winLockState,
   winCheckReservedLock,
-  osGenericSectorSize,
+  winSectorSize,
 };
 
 /*