mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Add a comment to the OsSectorSize() function. (CVS 3710)
FossilOrigin-Name: 0fd9983a98d8d61654f252f1708a4d7232a96b53
This commit is contained in:
20
manifest
20
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)
|
C Add\sa\scomment\sto\sthe\sOsSectorSize()\sfunction.\s(CVS\s3710)
|
||||||
D 2007-03-22T15:22:06
|
D 2007-03-23T10:08:39
|
||||||
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
|
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
|
||||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -77,14 +77,14 @@ F src/main.c af8922e0205cf618392de2836c9efad71786d0d6
|
|||||||
F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
|
F src/md5.c c5fdfa5c2593eaee2e32a5ce6c6927c986eaf217
|
||||||
F src/os.c 6df3e9c23eaa982d3e66ef770ad2519de5dd4d97
|
F src/os.c 6df3e9c23eaa982d3e66ef770ad2519de5dd4d97
|
||||||
F src/os.h ec780b3561d0bb887d13f193a1a889872c44a236
|
F src/os.h ec780b3561d0bb887d13f193a1a889872c44a236
|
||||||
F src/os_common.h aa3ef56941dcaf480b6f055a615674fe4909edbc
|
F src/os_common.h fdccdbedd7e13ef4cb7f9e33484244a27a6b4c4e
|
||||||
F src/os_os2.c 175101ffc2142c3fc7962ed7a171806f28f95363
|
F src/os_os2.c de7e1660c72493e177424dddf5130d70fb711752
|
||||||
F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
|
F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3
|
||||||
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
|
F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
|
||||||
F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
|
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_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||||
F src/os_win.c f3ca3e08167eb3382781b840e787809eccb626dc
|
F src/os_win.c 1d1d0989b0f235751504292c2f28e81044be0d70
|
||||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||||
F src/pager.c dec2b25851190ab2d5b7d44065fae625c566dda5
|
F src/pager.c dec2b25851190ab2d5b7d44065fae625c566dda5
|
||||||
F src/pager.h 9f6b5ef42c761deec8a9b1966b32e9a9dc89a631
|
F src/pager.h 9f6b5ef42c761deec8a9b1966b32e9a9dc89a631
|
||||||
@@ -437,7 +437,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||||
P b078f09bffee5863d595d281f2ecd14e1c9ec727
|
P 177cd92910d01c97eb3133a59fad417edbb1aa92
|
||||||
R 9457b72e4d50a7bf046bedc43327a3b4
|
R a47ce4776623e0598aaf36f17e96e9f0
|
||||||
U drh
|
U danielk1977
|
||||||
Z 2f03d003f64477a1b374c8414bc90cbd
|
Z 7cc396a55ca909ea4a46a72e6fbe0bfd
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
177cd92910d01c97eb3133a59fad417edbb1aa92
|
0fd9983a98d8d61654f252f1708a4d7232a96b53
|
||||||
@@ -197,7 +197,4 @@ int sqlite3GenericAllocationSize(void *p){ return 0; }
|
|||||||
#ifndef PAGER_SECTOR_SIZE
|
#ifndef PAGER_SECTOR_SIZE
|
||||||
# define PAGER_SECTOR_SIZE 512
|
# define PAGER_SECTOR_SIZE 512
|
||||||
#endif
|
#endif
|
||||||
static int osGenericSectorSize(OsFile *id){
|
|
||||||
return PAGER_SECTOR_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
16
src/os_os2.c
16
src/os_os2.c
@@ -732,6 +732,20 @@ static int os2LockState( OsFile *id ){
|
|||||||
return ((os2File*)id)->locktype;
|
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
|
** This vector defines all the methods that can operate on an OsFile
|
||||||
** for os2.
|
** for os2.
|
||||||
@@ -751,7 +765,7 @@ static const IoMethod sqlite3Os2IoMethod = {
|
|||||||
os2Unlock,
|
os2Unlock,
|
||||||
os2LockState,
|
os2LockState,
|
||||||
os2CheckReservedLock,
|
os2CheckReservedLock,
|
||||||
osGenericSectorSize,
|
os2SectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -2340,6 +2340,20 @@ static int unixLockState(OsFile *id){
|
|||||||
return ((unixFile*)id)->locktype;
|
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
|
** This vector defines all the methods that can operate on an OsFile
|
||||||
** for unix.
|
** for unix.
|
||||||
@@ -2359,7 +2373,7 @@ static const IoMethod sqlite3UnixIoMethod = {
|
|||||||
unixUnlock,
|
unixUnlock,
|
||||||
unixLockState,
|
unixLockState,
|
||||||
unixCheckReservedLock,
|
unixCheckReservedLock,
|
||||||
osGenericSectorSize,
|
unixSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SQLITE_ENABLE_LOCKING_STYLE
|
#ifdef SQLITE_ENABLE_LOCKING_STYLE
|
||||||
@@ -2382,7 +2396,7 @@ static const IoMethod sqlite3AFPLockingUnixIoMethod = {
|
|||||||
afpUnixUnlock,
|
afpUnixUnlock,
|
||||||
unixLockState,
|
unixLockState,
|
||||||
afpUnixCheckReservedLock,
|
afpUnixCheckReservedLock,
|
||||||
osGenericSectorSize,
|
unixSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2404,7 +2418,7 @@ static const IoMethod sqlite3FlockLockingUnixIoMethod = {
|
|||||||
flockUnixUnlock,
|
flockUnixUnlock,
|
||||||
unixLockState,
|
unixLockState,
|
||||||
flockUnixCheckReservedLock,
|
flockUnixCheckReservedLock,
|
||||||
osGenericSectorSize,
|
unixSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2426,7 +2440,7 @@ static const IoMethod sqlite3DotlockLockingUnixIoMethod = {
|
|||||||
dotlockUnixUnlock,
|
dotlockUnixUnlock,
|
||||||
unixLockState,
|
unixLockState,
|
||||||
dotlockUnixCheckReservedLock,
|
dotlockUnixCheckReservedLock,
|
||||||
osGenericSectorSize,
|
unixSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2448,7 +2462,7 @@ static const IoMethod sqlite3NolockLockingUnixIoMethod = {
|
|||||||
nolockUnixUnlock,
|
nolockUnixUnlock,
|
||||||
unixLockState,
|
unixLockState,
|
||||||
nolockUnixCheckReservedLock,
|
nolockUnixCheckReservedLock,
|
||||||
osGenericSectorSize,
|
unixSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SQLITE_ENABLE_LOCKING_STYLE */
|
#endif /* SQLITE_ENABLE_LOCKING_STYLE */
|
||||||
|
|||||||
16
src/os_win.c
16
src/os_win.c
@@ -1454,6 +1454,20 @@ static int winLockState(OsFile *id){
|
|||||||
return ((winFile*)id)->locktype;
|
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
|
** This vector defines all the methods that can operate on an OsFile
|
||||||
** for win32.
|
** for win32.
|
||||||
@@ -1473,7 +1487,7 @@ static const IoMethod sqlite3WinIoMethod = {
|
|||||||
winUnlock,
|
winUnlock,
|
||||||
winLockState,
|
winLockState,
|
||||||
winCheckReservedLock,
|
winCheckReservedLock,
|
||||||
osGenericSectorSize,
|
winSectorSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user