retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
+3
-3
@@ -7,7 +7,7 @@
|
||||
/*===========================================================================*
|
||||
* attr_get *
|
||||
*===========================================================================*/
|
||||
PUBLIC void attr_get(attr)
|
||||
void attr_get(attr)
|
||||
struct hgfs_attr *attr;
|
||||
{
|
||||
/* Get attribute information from the RPC buffer, storing the requested parts
|
||||
@@ -35,7 +35,7 @@ struct hgfs_attr *attr;
|
||||
/*===========================================================================*
|
||||
* hgfs_getattr *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_getattr(path, attr)
|
||||
int hgfs_getattr(path, attr)
|
||||
char *path;
|
||||
struct hgfs_attr *attr;
|
||||
{
|
||||
@@ -58,7 +58,7 @@ struct hgfs_attr *attr;
|
||||
/*===========================================================================*
|
||||
* hgfs_setattr *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_setattr(path, attr)
|
||||
int hgfs_setattr(path, attr)
|
||||
char *path;
|
||||
struct hgfs_attr *attr;
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ enum {
|
||||
/*===========================================================================*
|
||||
* channel_open *
|
||||
*===========================================================================*/
|
||||
PUBLIC int channel_open(ch, type)
|
||||
int channel_open(ch, type)
|
||||
struct channel *ch; /* struct describing the new channel */
|
||||
u32_t type; /* channel type: CH_IN or CH_OUT */
|
||||
{
|
||||
@@ -46,7 +46,7 @@ u32_t type; /* channel type: CH_IN or CH_OUT */
|
||||
/*===========================================================================*
|
||||
* channel_close *
|
||||
*===========================================================================*/
|
||||
PUBLIC void channel_close(ch)
|
||||
void channel_close(ch)
|
||||
struct channel *ch; /* backdoor channel to close */
|
||||
{
|
||||
/* Close a previously opened backdoor channel.
|
||||
@@ -64,7 +64,7 @@ struct channel *ch; /* backdoor channel to close */
|
||||
/*===========================================================================*
|
||||
* channel_send *
|
||||
*===========================================================================*/
|
||||
PUBLIC int channel_send(ch, buf, len)
|
||||
int channel_send(ch, buf, len)
|
||||
struct channel *ch; /* backdoor channel to send to */
|
||||
char *buf; /* buffer to send data from */
|
||||
int len; /* size of the data to send */
|
||||
@@ -101,7 +101,7 @@ int len; /* size of the data to send */
|
||||
/*===========================================================================*
|
||||
* channel_recv *
|
||||
*===========================================================================*/
|
||||
PUBLIC int channel_recv(ch, buf, max)
|
||||
int channel_recv(ch, buf, max)
|
||||
struct channel *ch; /* backdoor channel to receive from */
|
||||
char *buf; /* buffer to receive data into */
|
||||
int max; /* size of the buffer */
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
/*===========================================================================*
|
||||
* hgfs_opendir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_opendir(path, handle)
|
||||
int hgfs_opendir(path, handle)
|
||||
char *path;
|
||||
hgfs_dir_t *handle;
|
||||
{
|
||||
@@ -28,7 +28,7 @@ hgfs_dir_t *handle;
|
||||
/*===========================================================================*
|
||||
* hgfs_readdir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_readdir(handle, index, buf, size, attr)
|
||||
int hgfs_readdir(handle, index, buf, size, attr)
|
||||
hgfs_dir_t handle;
|
||||
unsigned int index;
|
||||
char *buf;
|
||||
@@ -58,7 +58,7 @@ struct hgfs_attr *attr;
|
||||
/*===========================================================================*
|
||||
* hgfs_closedir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_closedir(handle)
|
||||
int hgfs_closedir(handle)
|
||||
hgfs_dir_t handle;
|
||||
{
|
||||
/* Close an open directory.
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
* that weren't in the original protocol, are being returned now.
|
||||
*/
|
||||
#define NERRS 16
|
||||
PRIVATE int error_map[NERRS] = {
|
||||
static int error_map[NERRS] = {
|
||||
OK, /* no error */
|
||||
ENOENT, /* no such file/directory */
|
||||
EBADF, /* invalid handle */
|
||||
@@ -28,7 +28,7 @@ PRIVATE int error_map[NERRS] = {
|
||||
/*===========================================================================*
|
||||
* error_convert *
|
||||
*===========================================================================*/
|
||||
PUBLIC int error_convert(err)
|
||||
int error_convert(err)
|
||||
int err;
|
||||
{
|
||||
/* Convert a HGFS error into an errno error code.
|
||||
|
||||
+6
-6
@@ -8,7 +8,7 @@
|
||||
/*===========================================================================*
|
||||
* hgfs_open *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_open(path, flags, mode, handle)
|
||||
int hgfs_open(path, flags, mode, handle)
|
||||
char *path; /* path name to open */
|
||||
int flags; /* open flags to use */
|
||||
int mode; /* mode to create (user bits only) */
|
||||
@@ -50,7 +50,7 @@ hgfs_file_t *handle; /* place to store resulting handle */
|
||||
/*===========================================================================*
|
||||
* hgfs_read *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_read(handle, buf, size, off)
|
||||
int hgfs_read(handle, buf, size, off)
|
||||
hgfs_file_t handle; /* handle to open file */
|
||||
char *buf; /* data buffer or NULL */
|
||||
size_t size; /* maximum number of bytes to read */
|
||||
@@ -84,7 +84,7 @@ u64_t off; /* file offset */
|
||||
/*===========================================================================*
|
||||
* hgfs_write *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_write(handle, buf, len, off, append)
|
||||
int hgfs_write(handle, buf, len, off, append)
|
||||
hgfs_file_t handle; /* handle to open file */
|
||||
const char *buf; /* data buffer or NULL */
|
||||
size_t len; /* number of bytes to write */
|
||||
@@ -125,7 +125,7 @@ int append; /* if set, append to file (ignore offset) */
|
||||
/*===========================================================================*
|
||||
* hgfs_close *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_close(handle)
|
||||
int hgfs_close(handle)
|
||||
hgfs_file_t handle; /* handle to open file */
|
||||
{
|
||||
/* Close an open file.
|
||||
@@ -140,7 +140,7 @@ hgfs_file_t handle; /* handle to open file */
|
||||
/*===========================================================================*
|
||||
* hgfs_readbuf *
|
||||
*===========================================================================*/
|
||||
PUBLIC size_t hgfs_readbuf(ptr)
|
||||
size_t hgfs_readbuf(ptr)
|
||||
char **ptr;
|
||||
{
|
||||
/* Return information about the read buffer, for zero-copy purposes. Store a
|
||||
@@ -162,7 +162,7 @@ char **ptr;
|
||||
/*===========================================================================*
|
||||
* hgfs_writebuf *
|
||||
*===========================================================================*/
|
||||
PUBLIC size_t hgfs_writebuf(ptr)
|
||||
size_t hgfs_writebuf(ptr)
|
||||
char **ptr;
|
||||
{
|
||||
/* Return information about the write buffer, for zero-copy purposes. Store a
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
/*===========================================================================*
|
||||
* hgfs_mkdir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_mkdir(path, mode)
|
||||
int hgfs_mkdir(path, mode)
|
||||
char *path;
|
||||
int mode;
|
||||
{
|
||||
@@ -25,7 +25,7 @@ int mode;
|
||||
/*===========================================================================*
|
||||
* hgfs_unlink *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_unlink(path)
|
||||
int hgfs_unlink(path)
|
||||
char *path;
|
||||
{
|
||||
/* Delete a file.
|
||||
@@ -41,7 +41,7 @@ char *path;
|
||||
/*===========================================================================*
|
||||
* hgfs_rmdir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_rmdir(path)
|
||||
int hgfs_rmdir(path)
|
||||
char *path;
|
||||
{
|
||||
/* Remove an empty directory.
|
||||
@@ -57,7 +57,7 @@ char *path;
|
||||
/*===========================================================================*
|
||||
* hgfs_rename *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_rename(opath, npath)
|
||||
int hgfs_rename(opath, npath)
|
||||
char *opath;
|
||||
char *npath;
|
||||
{
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
/*===========================================================================*
|
||||
* hgfs_init *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_init()
|
||||
int hgfs_init()
|
||||
{
|
||||
/* Initialize the library. Return OK on success, or a negative error code
|
||||
* otherwise. If EAGAIN is returned, shared folders are disabled; in that
|
||||
@@ -20,7 +20,7 @@ PUBLIC int hgfs_init()
|
||||
/*===========================================================================*
|
||||
* hgfs_cleanup *
|
||||
*===========================================================================*/
|
||||
PUBLIC void hgfs_cleanup()
|
||||
void hgfs_cleanup()
|
||||
{
|
||||
/* Clean up state.
|
||||
*/
|
||||
@@ -31,7 +31,7 @@ PUBLIC void hgfs_cleanup()
|
||||
/*===========================================================================*
|
||||
* hgfs_enabled *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_enabled()
|
||||
int hgfs_enabled()
|
||||
{
|
||||
/* Check if shared folders are enabled. Return OK if so, EAGAIN if not, and
|
||||
* another negative error code on error.
|
||||
@@ -43,7 +43,7 @@ PUBLIC int hgfs_enabled()
|
||||
/*===========================================================================*
|
||||
* hgfs_queryvol *
|
||||
*===========================================================================*/
|
||||
PUBLIC int hgfs_queryvol(path, free, total)
|
||||
int hgfs_queryvol(path, free, total)
|
||||
char *path;
|
||||
u64_t *free;
|
||||
u64_t *total;
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
/*===========================================================================*
|
||||
* path_put *
|
||||
*===========================================================================*/
|
||||
PUBLIC void path_put(path)
|
||||
void path_put(path)
|
||||
char *path;
|
||||
{
|
||||
/* Append the given path name in HGFS format to the RPC buffer. Truncate it
|
||||
@@ -42,7 +42,7 @@ char *path;
|
||||
/*===========================================================================*
|
||||
* path_get *
|
||||
*===========================================================================*/
|
||||
PUBLIC int path_get(path, max)
|
||||
int path_get(path, max)
|
||||
char *path;
|
||||
int max;
|
||||
{
|
||||
|
||||
+7
-7
@@ -2,15 +2,15 @@
|
||||
|
||||
#include "inc.h"
|
||||
|
||||
PUBLIC char rpc_buf[RPC_BUF_SIZE];
|
||||
PUBLIC char *rpc_ptr;
|
||||
char rpc_buf[RPC_BUF_SIZE];
|
||||
char *rpc_ptr;
|
||||
|
||||
PRIVATE struct channel rpc_chan;
|
||||
static struct channel rpc_chan;
|
||||
|
||||
/*===========================================================================*
|
||||
* rpc_open *
|
||||
*===========================================================================*/
|
||||
PUBLIC int rpc_open()
|
||||
int rpc_open()
|
||||
{
|
||||
/* Open a HGFS RPC backdoor channel to the VMware host, and make sure that it
|
||||
* is working. Return OK upon success, or a negative error code otherwise.
|
||||
@@ -31,7 +31,7 @@ PUBLIC int rpc_open()
|
||||
/*===========================================================================*
|
||||
* rpc_query *
|
||||
*===========================================================================*/
|
||||
PUBLIC int rpc_query()
|
||||
int rpc_query()
|
||||
{
|
||||
/* Send a HGFS RPC query over the backdoor channel. Return OK upon success, or
|
||||
* a negative error code otherwise; EAGAIN is returned if shared folders are
|
||||
@@ -69,7 +69,7 @@ PUBLIC int rpc_query()
|
||||
/*===========================================================================*
|
||||
* rpc_test *
|
||||
*===========================================================================*/
|
||||
PUBLIC int rpc_test()
|
||||
int rpc_test()
|
||||
{
|
||||
/* Test whether HGFS communication is working. Return OK on success, EAGAIN if
|
||||
* shared folders are disabled, or another negative error code upon error.
|
||||
@@ -85,7 +85,7 @@ PUBLIC int rpc_test()
|
||||
/*===========================================================================*
|
||||
* rpc_close *
|
||||
*===========================================================================*/
|
||||
PUBLIC void rpc_close()
|
||||
void rpc_close()
|
||||
{
|
||||
/* Close the HGFS RPC backdoor channel.
|
||||
*/
|
||||
|
||||
+4
-4
@@ -2,12 +2,12 @@
|
||||
|
||||
#include "inc.h"
|
||||
|
||||
PRIVATE u64_t time_offset;
|
||||
static u64_t time_offset;
|
||||
|
||||
/*===========================================================================*
|
||||
* time_init *
|
||||
*===========================================================================*/
|
||||
PUBLIC void time_init()
|
||||
void time_init()
|
||||
{
|
||||
/* Initialize the time conversion module.
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ PUBLIC void time_init()
|
||||
/*===========================================================================*
|
||||
* time_put *
|
||||
*===========================================================================*/
|
||||
PUBLIC void time_put(timep)
|
||||
void time_put(timep)
|
||||
time_t *timep;
|
||||
{
|
||||
/* Store a UNIX timestamp pointed to by the given pointer onto the RPC buffer,
|
||||
@@ -47,7 +47,7 @@ time_t *timep;
|
||||
/*===========================================================================*
|
||||
* time_get *
|
||||
*===========================================================================*/
|
||||
PUBLIC void time_get(timep)
|
||||
void time_get(timep)
|
||||
time_t *timep;
|
||||
{
|
||||
/* Get a HGFS timestamp from the RPC buffer, convert it into a UNIX timestamp,
|
||||
|
||||
Reference in New Issue
Block a user