mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
MDEV-25710: Dead code os_file_opendir() in the server
The functions fil_file_readdir_next_file(), os_file_opendir(),
os_file_closedir() became dead code in the server in MariaDB 10.4.0
with commit 09af00cbde (the removal of
the crash recovery logic for the TRUNCATE TABLE implementation that
was replaced in MDEV-13564).
os_file_opendir(), os_file_closedir(): Define as macros.
This commit is contained in:
parent
4240704abc
commit
08b6fd9395
8 changed files with 301 additions and 414 deletions
|
|
@ -58,8 +58,6 @@ typedef ib_uint64_t os_offset_t;
|
|||
|
||||
#ifdef _WIN32
|
||||
|
||||
typedef HANDLE os_file_dir_t; /*!< directory stream */
|
||||
|
||||
/** We define always WIN_ASYNC_IO, and check at run-time whether
|
||||
the OS actually supports it: Win 95 does not, NT does. */
|
||||
# define WIN_ASYNC_IO
|
||||
|
|
@ -73,8 +71,6 @@ typedef HANDLE os_file_t;
|
|||
|
||||
#else /* _WIN32 */
|
||||
|
||||
typedef DIR* os_file_dir_t; /*!< directory stream */
|
||||
|
||||
/** File handle */
|
||||
typedef int os_file_t;
|
||||
|
||||
|
|
@ -515,43 +511,6 @@ parameter (--tmpdir).
|
|||
FILE*
|
||||
os_file_create_tmpfile();
|
||||
|
||||
/** The os_file_opendir() function opens a directory stream corresponding to the
|
||||
directory named by the dirname argument. The directory stream is positioned
|
||||
at the first entry. In both Unix and Windows we automatically skip the '.'
|
||||
and '..' items at the start of the directory listing.
|
||||
|
||||
@param[in] dirname directory name; it must not contain a trailing
|
||||
'\' or '/'
|
||||
@param[in] is_fatal true if we should treat an error as a fatal
|
||||
error; if we try to open symlinks then we do
|
||||
not wish a fatal error if it happens not to be
|
||||
a directory
|
||||
@return directory stream, NULL if error */
|
||||
os_file_dir_t
|
||||
os_file_opendir(
|
||||
const char* dirname,
|
||||
bool is_fatal);
|
||||
|
||||
/**
|
||||
Closes a directory stream.
|
||||
@param[in] dir directory stream
|
||||
@return 0 if success, -1 if failure */
|
||||
int
|
||||
os_file_closedir(
|
||||
os_file_dir_t dir);
|
||||
|
||||
/** This function returns information of the next file in the directory. We jump
|
||||
over the '.' and '..' entries in the directory.
|
||||
@param[in] dirname directory name or path
|
||||
@param[in] dir directory stream
|
||||
@param[out] info buffer where the info is returned
|
||||
@return 0 if ok, -1 if error, 1 if at the end of the directory */
|
||||
int
|
||||
os_file_readdir_next_file(
|
||||
const char* dirname,
|
||||
os_file_dir_t dir,
|
||||
os_file_stat_t* info);
|
||||
|
||||
/**
|
||||
This function attempts to create a directory named pathname. The new directory
|
||||
gets default permissions. On Unix, the permissions are (0770 & ~umask). If the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue