diff options
author | dumi@google.com <dumi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 20:14:50 +0000 |
---|---|---|
committer | dumi@google.com <dumi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 20:14:50 +0000 |
commit | ef19e1ae70025283d377e19ea7fd768b4fd90487 (patch) | |
tree | 2fedb878cbd8757cbd7bb729d3a140f4ef6f04f0 /third_party | |
parent | 87b1942db3bfe2dd9d3a07f15c7abd854ddd1785 (diff) | |
download | chromium_src-ef19e1ae70025283d377e19ea7fd768b4fd90487.zip chromium_src-ef19e1ae70025283d377e19ea7fd768b4fd90487.tar.gz chromium_src-ef19e1ae70025283d377e19ea7fd768b4fd90487.tar.bz2 |
Clean up os_unix.c.
TEST=none
BUG=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31888
Review URL: http://codereview.chromium.org/384075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/sqlite/src/os_unix.c | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/third_party/sqlite/src/os_unix.c b/third_party/sqlite/src/os_unix.c index 1eafda1..3ebfa04 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,23 @@ 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)); +} + +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. |