mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 19:30:26 +08:00
committed by
Joel Sherrill
parent
715615e0ab
commit
2a7ec88270
@@ -98,10 +98,10 @@ extern "C" {
|
||||
* @brief FTP file system IO control requests.
|
||||
*/
|
||||
typedef enum {
|
||||
RTEMS_FTPFS_IOCTL_GET_VERBOSE = _IOR( 'd', 1, bool *),
|
||||
RTEMS_FTPFS_IOCTL_SET_VERBOSE = _IOW( 'd', 1, bool *),
|
||||
RTEMS_FTPFS_IOCTL_GET_TIMEOUT = _IOR( 'd', 2, struct timeval *),
|
||||
RTEMS_FTPFS_IOCTL_SET_TIMEOUT = _IOW( 'd', 2, struct timeval *)
|
||||
RTEMS_FTPFS_IOCTL_GET_VERBOSE = _IOR( 'd', 1, bool * ),
|
||||
RTEMS_FTPFS_IOCTL_SET_VERBOSE = _IOW( 'd', 1, bool * ),
|
||||
RTEMS_FTPFS_IOCTL_GET_TIMEOUT = _IOR( 'd', 2, struct timeval * ),
|
||||
RTEMS_FTPFS_IOCTL_SET_TIMEOUT = _IOW( 'd', 2, struct timeval * )
|
||||
} rtems_ftpfs_ioctl_numbers;
|
||||
|
||||
/**
|
||||
@@ -111,7 +111,10 @@ typedef enum {
|
||||
* If @a mount_point is @c NULL the default mount point
|
||||
* @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
|
||||
*/
|
||||
rtems_status_code rtems_ftpfs_get_verbose( const char *mount_point, bool *verbose);
|
||||
rtems_status_code rtems_ftpfs_get_verbose(
|
||||
const char *mount_point,
|
||||
bool *verbose
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Enables or disables the verbose mode if @a verbose is @c true or
|
||||
@@ -123,7 +126,10 @@ rtems_status_code rtems_ftpfs_get_verbose( const char *mount_point, bool *verbos
|
||||
* If @a mount_point is @c NULL the default mount point
|
||||
* @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
|
||||
*/
|
||||
rtems_status_code rtems_ftpfs_set_verbose( const char *mount_point, bool verbose);
|
||||
rtems_status_code rtems_ftpfs_set_verbose(
|
||||
const char *mount_point,
|
||||
bool verbose
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Returns the current timeout value in @a timeout for the file system
|
||||
@@ -133,7 +139,7 @@ rtems_status_code rtems_ftpfs_set_verbose( const char *mount_point, bool verbose
|
||||
* @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
|
||||
*/
|
||||
rtems_status_code rtems_ftpfs_get_timeout(
|
||||
const char *mount_point,
|
||||
const char *mount_point,
|
||||
struct timeval *timeout
|
||||
);
|
||||
|
||||
@@ -149,7 +155,7 @@ rtems_status_code rtems_ftpfs_get_timeout(
|
||||
* @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
|
||||
*/
|
||||
rtems_status_code rtems_ftpfs_set_timeout(
|
||||
const char *mount_point,
|
||||
const char *mount_point,
|
||||
const struct timeval *timeout
|
||||
);
|
||||
|
||||
@@ -160,7 +166,7 @@ rtems_status_code rtems_ftpfs_set_timeout(
|
||||
*/
|
||||
int rtems_ftpfs_initialize(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
const void *data
|
||||
const void *data
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -57,7 +57,7 @@ extern "C" {
|
||||
*/
|
||||
int rtems_tftpfs_initialize(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
const void *data
|
||||
const void *data
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -288,9 +288,7 @@ typedef struct tftp_net_config {
|
||||
* The values are set to the defaults defined in
|
||||
* @ref tftp_net_config "`type tftp_net_config`".
|
||||
*/
|
||||
void tftp_initialize_net_config(
|
||||
tftp_net_config *config
|
||||
);
|
||||
void tftp_initialize_net_config( tftp_net_config *config );
|
||||
|
||||
/**
|
||||
* @brief Opens and starts a TFTP client session to read or write a
|
||||
@@ -343,11 +341,11 @@ void tftp_initialize_net_config(
|
||||
* @return Returns a POSIX @c errno value in case an error occurred.
|
||||
*/
|
||||
int tftp_open(
|
||||
const char *hostname,
|
||||
const char *path,
|
||||
bool is_for_reading,
|
||||
const char *hostname,
|
||||
const char *path,
|
||||
bool is_for_reading,
|
||||
const tftp_net_config *config,
|
||||
void **tftp_handle
|
||||
void **tftp_handle
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -373,11 +371,7 @@ int tftp_open(
|
||||
* into the buffer. If the return value is negative, an error occurred.
|
||||
* In this case the negated value is a POSIX @c errno value.
|
||||
*/
|
||||
ssize_t tftp_read(
|
||||
void *tftp_handle,
|
||||
void *buffer,
|
||||
size_t count
|
||||
);
|
||||
ssize_t tftp_read( void *tftp_handle, void *buffer, size_t count );
|
||||
|
||||
/**
|
||||
* @brief Write data to a TFTP server.
|
||||
@@ -403,11 +397,7 @@ ssize_t tftp_read(
|
||||
* If the return value is negative, an error occurred. In this case
|
||||
* the negated value is a POSIX @c errno value.
|
||||
*/
|
||||
ssize_t tftp_write(
|
||||
void *tftp_handle,
|
||||
const void *buffer,
|
||||
size_t count
|
||||
);
|
||||
ssize_t tftp_write( void *tftp_handle, const void *buffer, size_t count );
|
||||
|
||||
/**
|
||||
* @brief Close a TFTP client connection.
|
||||
@@ -431,9 +421,7 @@ ssize_t tftp_write(
|
||||
* @retval 0 When the client session was closed successfully.
|
||||
* @return Returns a POSIX @c errno value in case an error occurred.
|
||||
*/
|
||||
int tftp_close(
|
||||
void *tftp_handle
|
||||
);
|
||||
int tftp_close( void *tftp_handle );
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
+373
-401
File diff suppressed because it is too large
Load Diff
+940
-907
File diff suppressed because it is too large
Load Diff
@@ -75,15 +75,13 @@ extern "C" {
|
||||
* @param tftp_handle is the reference returned by a call to tftp_open().
|
||||
* If this parameter is @c NULL, the directive call is a no-op.
|
||||
*/
|
||||
void _Tftp_Destroy(
|
||||
void *tftp_handle
|
||||
);
|
||||
void _Tftp_Destroy( void *tftp_handle );
|
||||
|
||||
/* Only non-private to ease unit testing */
|
||||
ssize_t _Tftpfs_Parse_options(
|
||||
const char *option_str,
|
||||
const char *option_str,
|
||||
tftp_net_config *tftp_config,
|
||||
uint32_t *flags
|
||||
uint32_t *flags
|
||||
);
|
||||
|
||||
/** @} */
|
||||
|
||||
+331
-316
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user