summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite
diff options
context:
space:
mode:
authordumi@google.com <dumi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 05:18:47 +0000
committerdumi@google.com <dumi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 05:18:47 +0000
commitf5786406f232e8b509f56d10da8185a292c6902d (patch)
treee56e6877e8675c97bd50bbc9ed57115cfbe4165b /third_party/sqlite
parent9b2f47c559cdd1b6d0108c393e6a4b774181c1d1 (diff)
downloadchromium_src-f5786406f232e8b509f56d10da8185a292c6902d.zip
chromium_src-f5786406f232e8b509f56d10da8185a292c6902d.tar.gz
chromium_src-f5786406f232e8b509f56d10da8185a292c6902d.tar.bz2
Clean up os_unix.c.
TEST=none BUG=none Review URL: http://codereview.chromium.org/384075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite')
-rw-r--r--third_party/sqlite/src/os_unix.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/third_party/sqlite/src/os_unix.c b/third_party/sqlite/src/os_unix.c
index 1eafda1..88cf834 100644
--- a/third_party/sqlite/src/os_unix.c
+++ b/third_party/sqlite/src/os_unix.c
@@ -3497,32 +3497,9 @@ typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
*/
/*
-** Initializes a unixFile structure with zeros.
-*/
-void chromium_sqlite3_initialize_unix_sqlite3_file(sqlite3_file* file) {
- memset(file, 0, sizeof(unixFile));
-}
-
-// TODO(dumi): remove as soon as the WebKit patch is landed
-void initUnixFile(sqlite3_file* file) {
- chromium_sqlite3_initialize_unix_sqlite3_file(file);
-}
-
-int chromium_sqlite3_fill_in_unix_sqlite3_file(sqlite3_vfs* vfs,
- int fd,
- int dirfd,
- sqlite3_file* file,
- const char* fileName,
- int noLock,
- int isDelete) {
- return fillInUnixFile(vfs, fd, dirfd, file, fileName, noLock, isDelete);
-}
-
-// TODO(dumi): make this function static again as soon as the WebKit patch is landed
-/*
** Initialize the contents of the unixFile structure pointed to by pId.
*/
-int fillInUnixFile(
+static int fillInUnixFile(
sqlite3_vfs *pVfs, /* Pointer to vfs object */
int h, /* Open file descriptor of file being opened */
int dirfd, /* Directory file descriptor */
@@ -3836,6 +3813,26 @@ static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
}
/*
+** Initializes a unixFile structure with zeros.
+*/
+void chromium_sqlite3_initialize_unix_sqlite3_file(sqlite3_file* file) {
+ memset(file, 0, sizeof(unixFile));
+}
+
+/*
+** Fills up a unixFile structure with the given values.
+*/
+int chromium_sqlite3_fill_in_unix_sqlite3_file(sqlite3_vfs* vfs,
+ int fd,
+ int dirfd,
+ sqlite3_file* file,
+ const char* fileName,
+ int noLock,
+ int isDelete) {
+ return fillInUnixFile(vfs, fd, dirfd, file, fileName, noLock, isDelete);
+}
+
+/*
** Search for an unused file descriptor that was opened on the database file.
** If a suitable file descriptor if found, then it is stored in *fd; otherwise,
** *fd is not modified.