Getting rid of "old-style-definition"

Patch submitted by hoefnix. Ref.
https://groups.google.com/d/msg/minix-dev/sHQDVJRyx1c/eJjrYOqk5bgJ

Change-Id: I2fcdf4cf119ef252ccc7df06849baf37ffd08440
This commit is contained in:
Lionel Sambuc 2014-02-24 14:00:17 +01:00
parent 6bc75c4a0d
commit 03514ba605
47 changed files with 312 additions and 373 deletions

View file

@ -47,8 +47,8 @@ static int init_buffers(sub_dev_t *sub_dev_ptr);
static int get_started(sub_dev_t *sub_dev_ptr); static int get_started(sub_dev_t *sub_dev_ptr);
static int io_ctl_length(int io_request); static int io_ctl_length(int io_request);
static special_file_t* get_special_file(int minor_dev_nr); static special_file_t* get_special_file(int minor_dev_nr);
static void tell_dev(vir_bytes buf, size_t size, int pci_bus, int static void tell_dev(vir_bytes buf, size_t size, int pci_bus,
pci_dev, int pci_func); int pci_dev, int pci_func);
static char io_ctl_buf[IOCPARM_MASK]; static char io_ctl_buf[IOCPARM_MASK];
static int irq_hook_id = 0; /* id of irq hook at the kernel */ static int irq_hook_id = 0; /* id of irq hook at the kernel */
@ -90,7 +90,7 @@ int main(void)
/*===========================================================================* /*===========================================================================*
* sef_local_startup * * sef_local_startup *
*===========================================================================*/ *===========================================================================*/
static void sef_local_startup() static void sef_local_startup(void)
{ {
/* Register init callbacks. */ /* Register init callbacks. */
sef_setcb_init_fresh(sef_cb_init_fresh); sef_setcb_init_fresh(sef_cb_init_fresh);
@ -832,12 +832,8 @@ static special_file_t* get_special_file(int minor_dev_nr) {
return NULL; return NULL;
} }
static void tell_dev(buf, size, pci_bus, pci_dev, pci_func) static void tell_dev(vir_bytes buf, size_t size, int pci_bus,
vir_bytes buf; int pci_dev, int pci_func)
size_t size;
int pci_bus;
int pci_dev;
int pci_func;
{ {
int r; int r;
endpoint_t dev_e; endpoint_t dev_e;

View file

@ -11,22 +11,26 @@
/* Extended partition? */ /* Extended partition? */
#define ext_part(s) ((s) == 0x05 || (s) == 0x0F) #define ext_part(s) ((s) == 0x05 || (s) == 0x0F)
static void parse_part_table(struct blockdriver *bdp, int device, int static void parse_part_table(struct blockdriver *bdp, int device,
style, int atapi, u8_t *tmp_buf); int style, int atapi, u8_t *tmp_buf);
static void extpartition(struct blockdriver *bdp, int extdev, unsigned
long extbase, u8_t *tmp_buf); static void extpartition(struct blockdriver *bdp, int extdev,
static int get_part_table(struct blockdriver *bdp, int device, unsigned unsigned long extbase, u8_t *tmp_buf);
long offset, struct part_entry *table, u8_t *tmp_buf);
static int get_part_table(struct blockdriver *bdp, int device,
unsigned long offset, struct part_entry *table, u8_t *tmp_buf);
static void sort(struct part_entry *table); static void sort(struct part_entry *table);
/*============================================================================* /*============================================================================*
* partition * * partition *
*============================================================================*/ *============================================================================*/
void partition(bdp, device, style, atapi) void partition(
struct blockdriver *bdp; /* device dependent entry points */ struct blockdriver *bdp, /* device dependent entry points */
int device; /* device to partition */ int device, /* device to partition */
int style; /* partitioning style: floppy, primary, sub. */ int style, /* partitioning style: floppy, primary, sub. */
int atapi; /* atapi device */ int atapi /* atapi device */
)
{ {
/* This routine is called on first open to initialize the partition tables /* This routine is called on first open to initialize the partition tables
* of a device. * of a device.
@ -51,12 +55,13 @@ int atapi; /* atapi device */
/*============================================================================* /*============================================================================*
* parse_part_table * * parse_part_table *
*============================================================================*/ *============================================================================*/
static void parse_part_table(bdp, device, style, atapi, tmp_buf) static void parse_part_table(
struct blockdriver *bdp; /* device dependent entry points */ struct blockdriver *bdp, /* device dependent entry points */
int device; /* device to partition */ int device, /* device to partition */
int style; /* partitioning style: floppy, primary, sub. */ int style, /* partitioning style: floppy, primary, sub. */
int atapi; /* atapi device */ int atapi, /* atapi device */
u8_t *tmp_buf; /* temporary buffer */ u8_t *tmp_buf /* temporary buffer */
)
{ {
/* This routine reads and parses a partition table. It may be called /* This routine reads and parses a partition table. It may be called
* recursively. It makes sure that each partition falls safely within the * recursively. It makes sure that each partition falls safely within the
@ -128,11 +133,12 @@ u8_t *tmp_buf; /* temporary buffer */
/*============================================================================* /*============================================================================*
* extpartition * * extpartition *
*============================================================================*/ *============================================================================*/
static void extpartition(bdp, extdev, extbase, tmp_buf) static void extpartition(
struct blockdriver *bdp; /* device dependent entry points */ struct blockdriver *bdp, /* device dependent entry points */
int extdev; /* extended partition to scan */ int extdev, /* extended partition to scan */
unsigned long extbase; /* sector offset of the base ext. partition */ unsigned long extbase, /* sector offset of the base ext. partition */
u8_t *tmp_buf; /* temporary buffer */ u8_t *tmp_buf /* temporary buffer */
)
{ {
/* Extended partitions cannot be ignored alas, because people like to move /* Extended partitions cannot be ignored alas, because people like to move
* files to and from DOS partitions. Avoid reading this code, it's no fun. * files to and from DOS partitions. Avoid reading this code, it's no fun.
@ -177,12 +183,12 @@ u8_t *tmp_buf; /* temporary buffer */
/*============================================================================* /*============================================================================*
* get_part_table * * get_part_table *
*============================================================================*/ *============================================================================*/
static int get_part_table(bdp, device, offset, table, tmp_buf) static int get_part_table(
struct blockdriver *bdp; struct blockdriver *bdp,
int device; int device,
unsigned long offset; /* sector offset to the table */ unsigned long offset, /* sector offset to the table */
struct part_entry *table; /* four entries */ struct part_entry *table, /* four entries */
u8_t *tmp_buf; /* temporary buffer */ u8_t *tmp_buf) /* temporary buffer */
{ {
/* Read the partition table for the device, return true iff there were no /* Read the partition table for the device, return true iff there were no
* errors. * errors.
@ -210,8 +216,7 @@ u8_t *tmp_buf; /* temporary buffer */
/*===========================================================================* /*===========================================================================*
* sort * * sort *
*===========================================================================*/ *===========================================================================*/
static void sort(table) static void sort(struct part_entry *table)
struct part_entry *table;
{ {
/* Sort a partition table. */ /* Sort a partition table. */
struct part_entry *pe, tmp; struct part_entry *pe, tmp;

View file

@ -27,9 +27,9 @@ static int rs_down(char *label)
} }
char *find_rslabel(char *args_line); char *find_rslabel(char *args_line);
int mount(special, name, mountflags, srvflags, type, args)
char *name, *special, *type, *args; int mount(char *special, char *name, int mountflags, int srvflags,
int mountflags, srvflags; char *type, char *args)
{ {
int r; int r;
message m; message m;
@ -165,9 +165,7 @@ int mountflags, srvflags;
return r; return r;
} }
int umount(name, srvflags) int umount(const char *name, int srvflags)
const char *name;
int srvflags;
{ {
char label[MNT_LABEL_LEN]; char label[MNT_LABEL_LEN];
message m; message m;

View file

@ -46,14 +46,13 @@ char *etc_mtab = "/etc/mtab"; /* name of the /etc/mtab file */
static char mtab_in[BUF_SIZE+1]; /* holds /etc/mtab when it is read in */ static char mtab_in[BUF_SIZE+1]; /* holds /etc/mtab when it is read in */
static char *iptr = mtab_in; /* pointer to next line to feed out. */ static char *iptr = mtab_in; /* pointer to next line to feed out. */
int load_mtab(char *prog_name ); int load_mtab(char *prog_name);
int get_mtab_entry(char dev[PATH_MAX], char mount_point[PATH_MAX], int get_mtab_entry(char dev[PATH_MAX], char mount_point[PATH_MAX],
char type[MNTNAMELEN], char flags[MNTFLAGLEN]); char type[MNTNAMELEN], char flags[MNTFLAGLEN]);
static void err(char *prog_name, char *str ); static void err(char *prog_name, const char *str);
int load_mtab(prog_name) int load_mtab(char *prog_name)
char *prog_name;
{ {
/* Read in /etc/mtab and store it in /etc/mtab. */ /* Read in /etc/mtab and store it in /etc/mtab. */
@ -114,9 +113,7 @@ int get_mtab_entry(char dev[PATH_MAX], char mount_point[PATH_MAX],
} }
static void static void err(char *prog_name, const char *str)
err(prog_name, str)
char *prog_name, *str;
{ {
std_err(prog_name); std_err(prog_name);
std_err(str); std_err(str);

View file

@ -182,7 +182,7 @@ int devman_del_device(struct devman_dev *dev)
/**************************************************************************** /****************************************************************************
* devman_get_ep * * devman_get_ep *
***************************************************************************/ ***************************************************************************/
endpoint_t devman_get_ep() endpoint_t devman_get_ep(void)
{ {
return devman_ep; return devman_ep;
} }
@ -190,7 +190,7 @@ endpoint_t devman_get_ep()
/**************************************************************************** /****************************************************************************
* devman_init * * devman_init *
***************************************************************************/ ***************************************************************************/
int devman_init() int devman_init(void)
{ {
int res; int res;

View file

@ -7,8 +7,7 @@
/*===========================================================================* /*===========================================================================*
* attr_get * * attr_get *
*===========================================================================*/ *===========================================================================*/
void attr_get(attr) void attr_get(struct sffs_attr *attr)
struct sffs_attr *attr;
{ {
/* Get attribute information from the RPC buffer, storing the requested parts /* Get attribute information from the RPC buffer, storing the requested parts
* in the given attr structure. * in the given attr structure.
@ -35,9 +34,7 @@ struct sffs_attr *attr;
/*===========================================================================* /*===========================================================================*
* hgfs_getattr * * hgfs_getattr *
*===========================================================================*/ *===========================================================================*/
int hgfs_getattr(path, attr) int hgfs_getattr(char *path, struct sffs_attr *attr)
char *path;
struct sffs_attr *attr;
{ {
/* Get selected attributes of a file by path name. /* Get selected attributes of a file by path name.
*/ */
@ -58,9 +55,7 @@ struct sffs_attr *attr;
/*===========================================================================* /*===========================================================================*
* hgfs_setattr * * hgfs_setattr *
*===========================================================================*/ *===========================================================================*/
int hgfs_setattr(path, attr) int hgfs_setattr(char *path, struct sffs_attr *attr)
char *path;
struct sffs_attr *attr;
{ {
/* Set selected attributes of a file by path name. /* Set selected attributes of a file by path name.
*/ */

View file

@ -19,9 +19,10 @@ enum {
/*===========================================================================* /*===========================================================================*
* channel_open * * channel_open *
*===========================================================================*/ *===========================================================================*/
int channel_open(ch, type) int channel_open(
struct channel *ch; /* struct describing the new channel */ struct channel *ch, /* struct describing the new channel */
u32_t type; /* channel type: CH_IN or CH_OUT */ u32_t type /* channel type: CH_IN or CH_OUT */
)
{ {
/* Open a new backdoor channel. Upon success, the given channel structure will /* Open a new backdoor channel. Upon success, the given channel structure will
* be filled with information and can be used in subsequent channel calls. * be filled with information and can be used in subsequent channel calls.
@ -46,8 +47,9 @@ u32_t type; /* channel type: CH_IN or CH_OUT */
/*===========================================================================* /*===========================================================================*
* channel_close * * channel_close *
*===========================================================================*/ *===========================================================================*/
void channel_close(ch) void channel_close(
struct channel *ch; /* backdoor channel to close */ struct channel *ch /* backdoor channel to close */
)
{ {
/* Close a previously opened backdoor channel. /* Close a previously opened backdoor channel.
*/ */
@ -64,10 +66,11 @@ struct channel *ch; /* backdoor channel to close */
/*===========================================================================* /*===========================================================================*
* channel_send * * channel_send *
*===========================================================================*/ *===========================================================================*/
int channel_send(ch, buf, len) int channel_send(
struct channel *ch; /* backdoor channel to send to */ struct channel *ch, /* backdoor channel to send to */
char *buf; /* buffer to send data from */ char *buf, /* buffer to send data from */
int len; /* size of the data to send */ int len /* size of the data to send */
)
{ {
/* Receive data over a backdoor channel. Return OK on success, or a negative /* Receive data over a backdoor channel. Return OK on success, or a negative
* error code on error. * error code on error.
@ -101,10 +104,11 @@ int len; /* size of the data to send */
/*===========================================================================* /*===========================================================================*
* channel_recv * * channel_recv *
*===========================================================================*/ *===========================================================================*/
int channel_recv(ch, buf, max) int channel_recv(
struct channel *ch; /* backdoor channel to receive from */ struct channel *ch, /* backdoor channel to receive from */
char *buf; /* buffer to receive data into */ char *buf, /* buffer to receive data into */
int max; /* size of the buffer */ int max /* size of the buffer */
)
{ {
/* Receive data on a backdoor channel. Return the number of bytes received, or /* Receive data on a backdoor channel. Return the number of bytes received, or
* a negative error code on error. * a negative error code on error.

View file

@ -5,9 +5,7 @@
/*===========================================================================* /*===========================================================================*
* hgfs_opendir * * hgfs_opendir *
*===========================================================================*/ *===========================================================================*/
int hgfs_opendir(path, handle) int hgfs_opendir(char *path, sffs_dir_t *handle)
char *path;
sffs_dir_t *handle;
{ {
/* Open a directory. Store a directory handle upon success. /* Open a directory. Store a directory handle upon success.
*/ */
@ -28,12 +26,8 @@ sffs_dir_t *handle;
/*===========================================================================* /*===========================================================================*
* hgfs_readdir * * hgfs_readdir *
*===========================================================================*/ *===========================================================================*/
int hgfs_readdir(handle, index, buf, size, attr) int hgfs_readdir(sffs_dir_t handle, unsigned int index, char *buf,
sffs_dir_t handle; size_t size, struct sffs_attr *attr)
unsigned int index;
char *buf;
size_t size;
struct sffs_attr *attr;
{ {
/* Read a directory entry from an open directory, using a zero-based index /* Read a directory entry from an open directory, using a zero-based index
* number. Upon success, the resulting path name is stored in the given buffer * number. Upon success, the resulting path name is stored in the given buffer
@ -66,8 +60,7 @@ struct sffs_attr *attr;
/*===========================================================================* /*===========================================================================*
* hgfs_closedir * * hgfs_closedir *
*===========================================================================*/ *===========================================================================*/
int hgfs_closedir(handle) int hgfs_closedir(sffs_dir_t handle)
sffs_dir_t handle;
{ {
/* Close an open directory. /* Close an open directory.
*/ */

View file

@ -28,8 +28,7 @@ static int error_map[NERRS] = {
/*===========================================================================* /*===========================================================================*
* error_convert * * error_convert *
*===========================================================================*/ *===========================================================================*/
int error_convert(err) int error_convert(int err)
int err;
{ {
/* Convert a HGFS error into an errno error code. /* Convert a HGFS error into an errno error code.
*/ */

View file

@ -8,11 +8,12 @@
/*===========================================================================* /*===========================================================================*
* hgfs_open * * hgfs_open *
*===========================================================================*/ *===========================================================================*/
int hgfs_open(path, flags, mode, handle) int hgfs_open(
char *path; /* path name to open */ char *path, /* path name to open */
int flags; /* open flags to use */ int flags, /* open flags to use */
int mode; /* mode to create (user bits only) */ int mode, /* mode to create (user bits only) */
sffs_file_t *handle; /* place to store resulting handle */ sffs_file_t *handle /* place to store resulting handle */
)
{ {
/* Open a file. Store a file handle upon success. /* Open a file. Store a file handle upon success.
*/ */
@ -50,11 +51,12 @@ sffs_file_t *handle; /* place to store resulting handle */
/*===========================================================================* /*===========================================================================*
* hgfs_read * * hgfs_read *
*===========================================================================*/ *===========================================================================*/
ssize_t hgfs_read(handle, buf, size, off) ssize_t hgfs_read(
sffs_file_t handle; /* handle to open file */ sffs_file_t handle, /* handle to open file */
char *buf; /* data buffer or NULL */ char *buf, /* data buffer or NULL */
size_t size; /* maximum number of bytes to read */ size_t size, /* maximum number of bytes to read */
u64_t off; /* file offset */ u64_t off /* file offset */
)
{ {
/* Read from an open file. Upon success, return the number of bytes read. /* Read from an open file. Upon success, return the number of bytes read.
*/ */
@ -84,11 +86,12 @@ u64_t off; /* file offset */
/*===========================================================================* /*===========================================================================*
* hgfs_write * * hgfs_write *
*===========================================================================*/ *===========================================================================*/
ssize_t hgfs_write(handle, buf, len, off) ssize_t hgfs_write(
sffs_file_t handle; /* handle to open file */ sffs_file_t handle, /* handle to open file */
char *buf; /* data buffer or NULL */ char *buf, /* data buffer or NULL */
size_t len; /* number of bytes to write */ size_t len, /* number of bytes to write */
u64_t off; /* file offset */ u64_t off /* file offset */
)
{ {
/* Write to an open file. Upon success, return the number of bytes written. /* Write to an open file. Upon success, return the number of bytes written.
*/ */
@ -115,8 +118,9 @@ u64_t off; /* file offset */
/*===========================================================================* /*===========================================================================*
* hgfs_close * * hgfs_close *
*===========================================================================*/ *===========================================================================*/
int hgfs_close(handle) int hgfs_close(
sffs_file_t handle; /* handle to open file */ sffs_file_t handle /* handle to open file */
)
{ {
/* Close an open file. /* Close an open file.
*/ */
@ -130,8 +134,7 @@ sffs_file_t handle; /* handle to open file */
/*===========================================================================* /*===========================================================================*
* hgfs_readbuf * * hgfs_readbuf *
*===========================================================================*/ *===========================================================================*/
size_t hgfs_readbuf(ptr) size_t hgfs_readbuf(char **ptr)
char **ptr;
{ {
/* Return information about the read buffer, for zero-copy purposes. Store a /* Return information about the read buffer, for zero-copy purposes. Store a
* pointer to the first byte of the read buffer, and return the maximum data * pointer to the first byte of the read buffer, and return the maximum data
@ -152,8 +155,7 @@ char **ptr;
/*===========================================================================* /*===========================================================================*
* hgfs_writebuf * * hgfs_writebuf *
*===========================================================================*/ *===========================================================================*/
size_t hgfs_writebuf(ptr) size_t hgfs_writebuf(char **ptr)
char **ptr;
{ {
/* Return information about the write buffer, for zero-copy purposes. Store a /* Return information about the write buffer, for zero-copy purposes. Store a
* pointer to the first byte of the write buffer, and return the maximum data * pointer to the first byte of the write buffer, and return the maximum data

View file

@ -5,10 +5,7 @@
/*===========================================================================* /*===========================================================================*
* hgfs_queryvol * * hgfs_queryvol *
*===========================================================================*/ *===========================================================================*/
int hgfs_queryvol(path, free, total) int hgfs_queryvol(char *path, u64_t *free, u64_t *total)
char *path;
u64_t *free;
u64_t *total;
{ {
/* Retrieve information about available and total volume space associated with /* Retrieve information about available and total volume space associated with
* a given path. * a given path.

View file

@ -7,9 +7,7 @@
/*===========================================================================* /*===========================================================================*
* hgfs_mkdir * * hgfs_mkdir *
*===========================================================================*/ *===========================================================================*/
int hgfs_mkdir(path, mode) int hgfs_mkdir(char *path, int mode)
char *path;
int mode;
{ {
/* Create a new directory. /* Create a new directory.
*/ */
@ -25,8 +23,7 @@ int mode;
/*===========================================================================* /*===========================================================================*
* hgfs_unlink * * hgfs_unlink *
*===========================================================================*/ *===========================================================================*/
int hgfs_unlink(path) int hgfs_unlink(char *path)
char *path;
{ {
/* Delete a file. /* Delete a file.
*/ */
@ -41,8 +38,7 @@ char *path;
/*===========================================================================* /*===========================================================================*
* hgfs_rmdir * * hgfs_rmdir *
*===========================================================================*/ *===========================================================================*/
int hgfs_rmdir(path) int hgfs_rmdir(char *path)
char *path;
{ {
/* Remove an empty directory. /* Remove an empty directory.
*/ */
@ -57,9 +53,7 @@ char *path;
/*===========================================================================* /*===========================================================================*
* hgfs_rename * * hgfs_rename *
*===========================================================================*/ *===========================================================================*/
int hgfs_rename(opath, npath) int hgfs_rename(char *opath, char *npath)
char *opath;
char *npath;
{ {
/* Rename a file or directory. /* Rename a file or directory.
*/ */

View file

@ -7,8 +7,7 @@
/*===========================================================================* /*===========================================================================*
* path_put * * path_put *
*===========================================================================*/ *===========================================================================*/
void path_put(path) void path_put(char *path)
char *path;
{ {
/* Append the given path name in HGFS format to the RPC buffer. Truncate it /* Append the given path name in HGFS format to the RPC buffer. Truncate it
* if it is longer than PATH_MAX bytes. * if it is longer than PATH_MAX bytes.
@ -42,9 +41,7 @@ char *path;
/*===========================================================================* /*===========================================================================*
* path_get * * path_get *
*===========================================================================*/ *===========================================================================*/
int path_get(path, max) int path_get(char *path, int max)
char *path;
int max;
{ {
/* Retrieve a HGFS formatted path name from the RPC buffer. Returns EINVAL if /* Retrieve a HGFS formatted path name from the RPC buffer. Returns EINVAL if
* the path name is invalid. Returns ENAMETOOLONG if the path name is too * the path name is invalid. Returns ENAMETOOLONG if the path name is too

View file

@ -10,7 +10,7 @@ static struct channel rpc_chan;
/*===========================================================================* /*===========================================================================*
* rpc_open * * rpc_open *
*===========================================================================*/ *===========================================================================*/
int rpc_open() int rpc_open(void)
{ {
/* Open a HGFS RPC backdoor channel to the VMware host, and make sure that it /* 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; in * is working. Return OK upon success, or a negative error code otherwise; in
@ -32,7 +32,7 @@ int rpc_open()
/*===========================================================================* /*===========================================================================*
* rpc_query * * rpc_query *
*===========================================================================*/ *===========================================================================*/
int rpc_query() int rpc_query(void)
{ {
/* Send a HGFS RPC query over the backdoor channel. Return OK upon success, or /* 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 * a negative error code otherwise; EAGAIN is returned if shared folders are
@ -70,7 +70,7 @@ int rpc_query()
/*===========================================================================* /*===========================================================================*
* rpc_test * * rpc_test *
*===========================================================================*/ *===========================================================================*/
int rpc_test() int rpc_test(void)
{ {
/* Test whether HGFS communication is working. Return OK on success, EAGAIN if /* Test whether HGFS communication is working. Return OK on success, EAGAIN if
* shared folders are disabled, or another negative error code upon error. * shared folders are disabled, or another negative error code upon error.
@ -86,7 +86,7 @@ int rpc_test()
/*===========================================================================* /*===========================================================================*
* rpc_close * * rpc_close *
*===========================================================================*/ *===========================================================================*/
void rpc_close() void rpc_close(void)
{ {
/* Close the HGFS RPC backdoor channel. /* Close the HGFS RPC backdoor channel.
*/ */

View file

@ -228,8 +228,7 @@ static u8_t* dns_payload;
* Initialize the resolver: set up the UDP pcb and configure the default server * Initialize the resolver: set up the UDP pcb and configure the default server
* (DNS_SERVER_ADDRESS). * (DNS_SERVER_ADDRESS).
*/ */
void void dns_init(void)
dns_init()
{ {
ip_addr_t dnsserver; ip_addr_t dnsserver;

View file

@ -46,8 +46,7 @@ static int rdwt_err;
static int quiet = 0; static int quiet = 0;
void void lmfs_setquiet(int q) { quiet = q; }
lmfs_setquiet(int q) { quiet = q; }
static u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u64_t bfree, static u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u64_t bfree,
int blocksize, dev_t majordev) int blocksize, dev_t majordev)
@ -115,26 +114,22 @@ void lmfs_blockschange(dev_t dev, int delta)
} }
} }
void void lmfs_markdirty(struct buf *bp)
lmfs_markdirty(struct buf *bp)
{ {
bp->lmfs_flags |= VMMC_DIRTY; bp->lmfs_flags |= VMMC_DIRTY;
} }
void void lmfs_markclean(struct buf *bp)
lmfs_markclean(struct buf *bp)
{ {
bp->lmfs_flags &= ~VMMC_DIRTY; bp->lmfs_flags &= ~VMMC_DIRTY;
} }
int int lmfs_isclean(struct buf *bp)
lmfs_isclean(struct buf *bp)
{ {
return !(bp->lmfs_flags & VMMC_DIRTY); return !(bp->lmfs_flags & VMMC_DIRTY);
} }
dev_t dev_t lmfs_dev(struct buf *bp)
lmfs_dev(struct buf *bp)
{ {
return bp->lmfs_dev; return bp->lmfs_dev;
} }
@ -144,8 +139,7 @@ int lmfs_bytes(struct buf *bp)
return bp->lmfs_bytes; return bp->lmfs_bytes;
} }
static void static void free_unused_blocks(void)
free_unused_blocks(void)
{ {
struct buf *bp; struct buf *bp;
@ -161,8 +155,7 @@ free_unused_blocks(void)
printf("libminixfs: freeing; %d blocks, %d bytes\n", freed, bytes); printf("libminixfs: freeing; %d blocks, %d bytes\n", freed, bytes);
} }
static void static void lmfs_alloc_block(struct buf *bp)
lmfs_alloc_block(struct buf *bp)
{ {
int len; int len;
ASSERT(!bp->data); ASSERT(!bp->data);
@ -418,9 +411,10 @@ struct buf *lmfs_get_block_ino(dev_t dev, block_t block, int only_search,
/*===========================================================================* /*===========================================================================*
* lmfs_put_block * * lmfs_put_block *
*===========================================================================*/ *===========================================================================*/
void lmfs_put_block(bp, block_type) void lmfs_put_block(
register struct buf *bp; /* pointer to the buffer to be released */ struct buf *bp, /* pointer to the buffer to be released */
int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */ int block_type /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
)
{ {
/* Return a block to the list of available blocks. Depending on 'block_type' /* Return a block to the list of available blocks. Depending on 'block_type'
* it may be put on the front or rear of the LRU chain. Blocks that are * it may be put on the front or rear of the LRU chain. Blocks that are
@ -501,8 +495,9 @@ void lmfs_cache_reevaluate(dev_t dev)
/*===========================================================================* /*===========================================================================*
* read_block * * read_block *
*===========================================================================*/ *===========================================================================*/
static void read_block(bp) static void read_block(
register struct buf *bp; /* buffer pointer */ struct buf *bp /* buffer pointer */
)
{ {
/* Read or write a disk block. This is the only routine in which actual disk /* Read or write a disk block. This is the only routine in which actual disk
* I/O is invoked. If an error occurs, a message is printed here, but the error * I/O is invoked. If an error occurs, a message is printed here, but the error
@ -770,8 +765,7 @@ void lmfs_rw_scattered(
/*===========================================================================* /*===========================================================================*
* rm_lru * * rm_lru *
*===========================================================================*/ *===========================================================================*/
static void rm_lru(bp) static void rm_lru(struct buf *bp)
struct buf *bp;
{ {
/* Remove a block from its LRU chain. */ /* Remove a block from its LRU chain. */
struct buf *next_ptr, *prev_ptr; struct buf *next_ptr, *prev_ptr;

View file

@ -6,8 +6,7 @@ static char qbuf[8];
char *itoa(int n); char *itoa(int n);
char *itoa(n) char *itoa(int n)
int n;
{ {
register int r, k; register int r, k;
int flag = 0; int flag = 0;

View file

@ -68,7 +68,7 @@ int fs_ftrunc(void)
/*===========================================================================* /*===========================================================================*
* fs_link * * fs_link *
*===========================================================================*/ *===========================================================================*/
int fs_link() int fs_link(void)
{ {
/* Perform the link(name1, name2) system call. */ /* Perform the link(name1, name2) system call. */
@ -152,7 +152,7 @@ int fs_link()
/*===========================================================================* /*===========================================================================*
* fs_rdlink * * fs_rdlink *
*===========================================================================*/ *===========================================================================*/
int fs_rdlink() int fs_rdlink(void)
{ {
register int r; /* return value */ register int r; /* return value */
size_t copylen; size_t copylen;
@ -193,7 +193,7 @@ int fs_rdlink()
/*===========================================================================* /*===========================================================================*
* fs_rename * * fs_rename *
*===========================================================================*/ *===========================================================================*/
int fs_rename() int fs_rename(void)
{ {
/* Perform the rename(name1, name2) system call. */ /* Perform the rename(name1, name2) system call. */
struct puffs_node *old_dirp, *old_ip; /* ptrs to old dir, file pnodes */ struct puffs_node *old_dirp, *old_ip; /* ptrs to old dir, file pnodes */
@ -393,7 +393,7 @@ static int unlink_file(struct puffs_node *dirp, struct puffs_node *pn,
/*===========================================================================* /*===========================================================================*
* fs_unlink * * fs_unlink *
*===========================================================================*/ *===========================================================================*/
int fs_unlink() int fs_unlink(void)
{ {
/* Perform the unlink(name) or rmdir(name) system call. The code for these two /* Perform the unlink(name) or rmdir(name) system call. The code for these two
* is almost the same. They differ only in some condition testing. Unlink() * is almost the same. They differ only in some condition testing. Unlink()
@ -467,10 +467,11 @@ int fs_unlink()
/*===========================================================================* /*===========================================================================*
* remove_dir * * remove_dir *
*===========================================================================*/ *===========================================================================*/
static int remove_dir(pn_dir, pn, pcn) static int remove_dir(
struct puffs_node *pn_dir; /* parent directory */ struct puffs_node *pn_dir, /* parent directory */
struct puffs_node *pn; /* directory to be removed */ struct puffs_node *pn, /* directory to be removed */
struct puffs_cn *pcn; /* Name, creads of directory */ struct puffs_cn *pcn /* Name, creads of directory */
)
{ {
/* A directory file has to be removed. Five conditions have to met: /* A directory file has to be removed. Five conditions have to met:
* - The file must be a directory * - The file must be a directory
@ -525,10 +526,11 @@ struct puffs_cn *pcn; /* Name, creads of directory */
/*===========================================================================* /*===========================================================================*
* unlink_file * * unlink_file *
*===========================================================================*/ *===========================================================================*/
static int unlink_file(dirp, pn, pcn) static int unlink_file(
struct puffs_node *dirp; /* parent directory of file */ struct puffs_node *dirp, /* parent directory of file */
struct puffs_node *pn; /* pnode of file, may be NULL too. */ struct puffs_node *pn, /* pnode of file, may be NULL too. */
struct puffs_cn *pcn; /* Name, creads of file */ struct puffs_cn *pcn /* Name, creads of file */
)
{ {
/* Unlink 'file_name'; pn must be the pnode of 'file_name' */ /* Unlink 'file_name'; pn must be the pnode of 'file_name' */
int r; int r;

View file

@ -12,7 +12,7 @@
/*===========================================================================* /*===========================================================================*
* fs_sync * * fs_sync *
*===========================================================================*/ *===========================================================================*/
int fs_sync() int fs_sync(void)
{ {
/* Perform the sync() system call. Flush all the tables. /* Perform the sync() system call. Flush all the tables.
* The order in which the various tables are flushed is critical. * The order in which the various tables are flushed is critical.
@ -35,7 +35,7 @@ int fs_sync()
/*===========================================================================* /*===========================================================================*
* fs_flush * * fs_flush *
*===========================================================================*/ *===========================================================================*/
int fs_flush() int fs_flush(void)
{ {
/* Flush the blocks of a device from the cache after writing any dirty blocks /* Flush the blocks of a device from the cache after writing any dirty blocks
* to disk. * to disk.

View file

@ -15,7 +15,7 @@
/*===========================================================================* /*===========================================================================*
* fs_readsuper * * fs_readsuper *
*===========================================================================*/ *===========================================================================*/
int fs_readsuper() int fs_readsuper(void)
{ {
struct vattr *root_va; struct vattr *root_va;
@ -42,7 +42,7 @@ int fs_readsuper()
/*===========================================================================* /*===========================================================================*
* fs_mountpoint * * fs_mountpoint *
*===========================================================================*/ *===========================================================================*/
int fs_mountpoint() int fs_mountpoint(void)
{ {
/* This function looks up the mount point, it checks the condition whether /* This function looks up the mount point, it checks the condition whether
* the partition can be mounted on the pnode or not. * the partition can be mounted on the pnode or not.
@ -75,7 +75,7 @@ int fs_mountpoint()
/*===========================================================================* /*===========================================================================*
* fs_unmount * * fs_unmount *
*===========================================================================*/ *===========================================================================*/
int fs_unmount() int fs_unmount(void)
{ {
int error; int error;

View file

@ -16,7 +16,7 @@
/*===========================================================================* /*===========================================================================*
* fs_create * * fs_create *
*===========================================================================*/ *===========================================================================*/
int fs_create() int fs_create(void)
{ {
int r; int r;
struct puffs_node *pn_dir; struct puffs_node *pn_dir;
@ -114,7 +114,7 @@ int fs_create()
/*===========================================================================* /*===========================================================================*
* fs_mknod * * fs_mknod *
*===========================================================================*/ *===========================================================================*/
int fs_mknod() int fs_mknod(void)
{ {
int r; int r;
struct puffs_node *pn_dir; struct puffs_node *pn_dir;
@ -197,7 +197,7 @@ int fs_mknod()
/*===========================================================================* /*===========================================================================*
* fs_mkdir * * fs_mkdir *
*===========================================================================*/ *===========================================================================*/
int fs_mkdir() int fs_mkdir(void)
{ {
int r; int r;
struct puffs_node *pn_dir; struct puffs_node *pn_dir;
@ -280,7 +280,7 @@ int fs_mkdir()
/*===========================================================================* /*===========================================================================*
* fs_slink * * fs_slink *
*===========================================================================*/ *===========================================================================*/
int fs_slink() int fs_slink(void)
{ {
int r; int r;
struct pnode *pn; /* pnode containing symbolic link */ struct pnode *pn; /* pnode containing symbolic link */
@ -372,7 +372,7 @@ int fs_slink()
/*===========================================================================* /*===========================================================================*
* fs_inhibread * * fs_inhibread *
*===========================================================================*/ *===========================================================================*/
int fs_inhibread() int fs_inhibread(void)
{ {
return(OK); return(OK);
} }

View file

@ -35,7 +35,7 @@ static int parse_path(pino_t dir_ino, pino_t root_ino, int flags, struct
/*===========================================================================* /*===========================================================================*
* fs_lookup * * fs_lookup *
*===========================================================================*/ *===========================================================================*/
int fs_lookup() int fs_lookup(void)
{ {
cp_grant_id_t grant; cp_grant_id_t grant;
int r, r1, flags, symlinks; int r, r1, flags, symlinks;
@ -129,13 +129,14 @@ int fs_lookup()
* parse_path * * parse_path *
*===========================================================================*/ *===========================================================================*/
static int parse_path( static int parse_path(
pino_t dir_ino, pino_t dir_ino,
pino_t root_ino, pino_t root_ino,
int flags, int flags,
struct puffs_node **res_inop, struct puffs_node **res_inop,
size_t *offsetp, size_t *offsetp,
int *symlinkp int *symlinkp
) { )
{
/* Parse the path in user_path, starting at dir_ino. If the path is the empty /* Parse the path in user_path, starting at dir_ino. If the path is the empty
* string, just return dir_ino. It is upto the caller to treat an empty * string, just return dir_ino. It is upto the caller to treat an empty
* path in a special way. Otherwise, if the path consists of just one or * path in a special way. Otherwise, if the path consists of just one or
@ -279,11 +280,12 @@ int *symlinkp
/*===========================================================================* /*===========================================================================*
* ltraverse * * ltraverse *
*===========================================================================*/ *===========================================================================*/
static int ltraverse(pn, suffix) static int ltraverse(
register struct puffs_node *pn;/* symbolic link */ struct puffs_node *pn, /* symbolic link */
char *suffix; /* current remaining path. Has to point in the char *suffix /* current remaining path. Has to point in the
* user_path buffer * user_path buffer
*/ */
)
{ {
/* Traverse a symbolic link. Copy the link text from the pnode and insert /* Traverse a symbolic link. Copy the link text from the pnode and insert
* the text into the path. Return error code or report success. Base * the text into the path. Return error code or report success. Base
@ -292,8 +294,8 @@ char *suffix; /* current remaining path. Has to point in the
*/ */
int r; int r;
char sp[PATH_MAX]; char sp[PATH_MAX];
size_t llen = PATH_MAX;/* length of link */ size_t llen = PATH_MAX; /* length of link */
size_t slen; /* length of suffix */ size_t slen; /* length of suffix */
PUFFS_MAKECRED(pcr, &global_kcred); PUFFS_MAKECRED(pcr, &global_kcred);
@ -355,10 +357,12 @@ char *suffix; /* current remaining path. Has to point in the
/*===========================================================================* /*===========================================================================*
* advance * * advance *
*===========================================================================*/ *===========================================================================*/
struct puffs_node *advance(pn_dir, string, chk_perm) struct puffs_node *advance(
struct puffs_node *pn_dir; /* pnode for directory to be searched */ struct puffs_node *pn_dir, /* pnode for directory to be searched */
char string[NAME_MAX + 1]; /* component name to look for */ char string[NAME_MAX + 1], /* component name to look for */
int chk_perm; /* check permissions when string is looked up*/ int chk_perm /* check permissions when string is
* looked up*/
)
{ {
/* Given a directory and a component of a path, look up the component in /* Given a directory and a component of a path, look up the component in
* the directory, find the pnode, open it, and return a pointer to its pnode * the directory, find the pnode, open it, and return a pointer to its pnode
@ -501,9 +505,10 @@ int chk_perm; /* check permissions when string is looked up*/
/*===========================================================================* /*===========================================================================*
* get_name * * get_name *
*===========================================================================*/ *===========================================================================*/
static char *get_name(path_name, string) static char *get_name(
char *path_name; /* path name to parse */ char *path_name, /* path name to parse */
char string[NAME_MAX+1]; /* component extracted from 'old_name' */ char string[NAME_MAX+1] /* component extracted from 'old_name' */
)
{ {
/* Given a pointer to a path name in fs space, 'path_name', copy the first /* Given a pointer to a path name in fs space, 'path_name', copy the first
* component to 'string' (truncated if necessary, always nul terminated). * component to 'string' (truncated if necessary, always nul terminated).

View file

@ -14,7 +14,7 @@ static int in_group(gid_t grp);
/*===========================================================================* /*===========================================================================*
* fs_chmod * * fs_chmod *
*===========================================================================*/ *===========================================================================*/
int fs_chmod() int fs_chmod(void)
{ {
/* Perform the chmod(name, mode) system call. */ /* Perform the chmod(name, mode) system call. */
struct puffs_node *pn; struct puffs_node *pn;
@ -48,7 +48,7 @@ int fs_chmod()
/*===========================================================================* /*===========================================================================*
* fs_chown * * fs_chown *
*===========================================================================*/ *===========================================================================*/
int fs_chown() int fs_chown(void)
{ {
struct puffs_node *pn; struct puffs_node *pn;
struct vattr va; struct vattr va;

View file

@ -683,7 +683,7 @@ puffs_mainloop(struct puffs_usermount *pu)
/*===========================================================================* /*===========================================================================*
* sef_local_startup * * sef_local_startup *
*===========================================================================*/ *===========================================================================*/
static void sef_local_startup() static void sef_local_startup(void)
{ {
/* Register init callbacks. */ /* Register init callbacks. */
sef_setcb_init_fresh(sef_cb_init_fresh); sef_setcb_init_fresh(sef_cb_init_fresh);
@ -735,8 +735,9 @@ static void sef_cb_signal_handler(int signo)
/*===========================================================================* /*===========================================================================*
* get_work * * get_work *
*===========================================================================*/ *===========================================================================*/
static void get_work(m_in) static void get_work(
message *m_in; /* pointer to message */ message *m_in /* pointer to message */
)
{ {
int r, srcok = 0; int r, srcok = 0;
endpoint_t src; endpoint_t src;

View file

@ -14,7 +14,7 @@
/*===========================================================================* /*===========================================================================*
* fs_stat * * fs_stat *
*===========================================================================*/ *===========================================================================*/
int fs_stat() int fs_stat(void)
{ {
register int r; /* return value */ register int r; /* return value */
register struct puffs_node *pn; /* target pnode */ register struct puffs_node *pn; /* target pnode */
@ -78,7 +78,7 @@ int fs_stat()
/*===========================================================================* /*===========================================================================*
* fs_statvfs * * fs_statvfs *
*===========================================================================*/ *===========================================================================*/
int fs_statvfs() int fs_statvfs(void)
{ {
int r; int r;
struct statvfs st; struct statvfs st;

View file

@ -14,7 +14,7 @@
/*===========================================================================* /*===========================================================================*
* fs_utime * * fs_utime *
*===========================================================================*/ *===========================================================================*/
int fs_utime() int fs_utime(void)
{ {
struct puffs_node *pn; struct puffs_node *pn;
struct vattr va; struct vattr va;

View file

@ -14,7 +14,7 @@
/*===========================================================================* /*===========================================================================*
* no_sys * * no_sys *
*===========================================================================*/ *===========================================================================*/
int no_sys() int no_sys(void)
{ {
/* Somebody has used an illegal system call number */ /* Somebody has used an illegal system call number */
lpuffs_debug("no_sys: invalid call %d\n", req_nr); lpuffs_debug("no_sys: invalid call %d\n", req_nr);
@ -38,7 +38,7 @@ void mfs_nul_f(const char *file, int line, char *str, unsigned int len,
/*===========================================================================* /*===========================================================================*
* clock_timespec * * clock_timespec *
*===========================================================================*/ *===========================================================================*/
struct timespec clock_timespec() struct timespec clock_timespec(void)
{ {
/* This routine returns the time in seconds since 1.1.1970. MINIX is an /* This routine returns the time in seconds since 1.1.1970. MINIX is an
* astrophysically naive system that assumes the earth rotates at a constant * astrophysically naive system that assumes the earth rotates at a constant

View file

@ -20,7 +20,7 @@ static unsigned int hash_dentry(struct inode *parent, char *name);
/*===========================================================================* /*===========================================================================*
* init_dentry * * init_dentry *
*===========================================================================*/ *===========================================================================*/
void init_dentry() void init_dentry(void)
{ {
/* Initialize the names hashtable. /* Initialize the names hashtable.
*/ */
@ -33,9 +33,7 @@ void init_dentry()
/*===========================================================================* /*===========================================================================*
* lookup_dentry * * lookup_dentry *
*===========================================================================*/ *===========================================================================*/
struct inode *lookup_dentry(parent, name) struct inode *lookup_dentry(struct inode *parent, char *name)
struct inode *parent;
char *name;
{ {
/* Given a directory inode and a component name, look up the inode associated /* Given a directory inode and a component name, look up the inode associated
* with that directory entry. Return the inode (with increased reference * with that directory entry. Return the inode (with increased reference
@ -64,10 +62,7 @@ char *name;
/*===========================================================================* /*===========================================================================*
* add_dentry * * add_dentry *
*===========================================================================*/ *===========================================================================*/
void add_dentry(parent, name, ino) void add_dentry(struct inode *parent, char *name, struct inode *ino)
struct inode *parent;
char *name;
struct inode *ino;
{ {
/* Add an entry to a parent inode, in the form of a new inode, with the given /* Add an entry to a parent inode, in the form of a new inode, with the given
* name. An entry with this name must not already exist. * name. An entry with this name must not already exist.
@ -92,8 +87,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* del_one_dentry * * del_one_dentry *
*===========================================================================*/ *===========================================================================*/
static void del_one_dentry(ino) static void del_one_dentry(struct inode *ino)
struct inode *ino;
{ {
/* This inode has become inaccessible by name. Disassociate it from its parent /* This inode has become inaccessible by name. Disassociate it from its parent
* and remove it from the names hash table. * and remove it from the names hash table.
@ -123,8 +117,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* del_dentry * * del_dentry *
*===========================================================================*/ *===========================================================================*/
void del_dentry(ino) void del_dentry(struct inode *ino)
struct inode *ino;
{ {
/* Disassociate an inode from its parent, effectively deleting it. Recursively /* Disassociate an inode from its parent, effectively deleting it. Recursively
* delete all its children as well, fragmenting the deleted branch into single * delete all its children as well, fragmenting the deleted branch into single
@ -167,9 +160,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* hash_dentry * * hash_dentry *
*===========================================================================*/ *===========================================================================*/
static unsigned int hash_dentry(parent, name) static unsigned int hash_dentry(struct inode *parent, char *name)
struct inode *parent;
char *name;
{ {
/* Generate a hash value for a given name. Normalize the name first, so that /* Generate a hash value for a given name. Normalize the name first, so that
* different variations of the name will result in the same hash value. * different variations of the name will result in the same hash value.

View file

@ -15,8 +15,7 @@
/*===========================================================================* /*===========================================================================*
* get_handle * * get_handle *
*===========================================================================*/ *===========================================================================*/
int get_handle(ino) int get_handle(struct inode *ino)
struct inode *ino;
{ {
/* Get an open file or directory handle for an inode. /* Get an open file or directory handle for an inode.
*/ */
@ -55,8 +54,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* put_handle * * put_handle *
*===========================================================================*/ *===========================================================================*/
void put_handle(ino) void put_handle(struct inode *ino)
struct inode *ino;
{ {
/* Close an open file or directory handle associated with an inode. /* Close an open file or directory handle associated with an inode.
*/ */

View file

@ -25,7 +25,7 @@ static TAILQ_HEAD(free_head, inode) free_list;
/*===========================================================================* /*===========================================================================*
* init_inode * * init_inode *
*===========================================================================*/ *===========================================================================*/
struct inode *init_inode() struct inode *init_inode(void)
{ {
/* Initialize inode table. Return the root inode. /* Initialize inode table. Return the root inode.
*/ */
@ -101,8 +101,7 @@ struct inode *find_inode(pino_t ino_nr)
/*===========================================================================* /*===========================================================================*
* get_inode * * get_inode *
*===========================================================================*/ *===========================================================================*/
void get_inode(ino) void get_inode(struct inode *ino)
struct inode *ino;
{ {
/* Increase the given inode's reference count. If both reference and link /* Increase the given inode's reference count. If both reference and link
* count were zero before, remove the inode from the free list. * count were zero before, remove the inode from the free list.
@ -125,8 +124,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* put_inode * * put_inode *
*===========================================================================*/ *===========================================================================*/
void put_inode(ino) void put_inode(struct inode *ino)
struct inode *ino;
{ {
/* Decrease an inode's reference count. If this count has reached zero, close /* Decrease an inode's reference count. If this count has reached zero, close
* the inode's file handle, if any. If both reference and link count have * the inode's file handle, if any. If both reference and link count have
@ -165,9 +163,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* link_inode * * link_inode *
*===========================================================================*/ *===========================================================================*/
void link_inode(parent, ino) void link_inode(struct inode *parent, struct inode *ino)
struct inode *parent;
struct inode *ino;
{ {
/* Link an inode to a parent. If both reference and link count were zero /* Link an inode to a parent. If both reference and link count were zero
* before, remove the inode from the free list. This function should only be * before, remove the inode from the free list. This function should only be
@ -186,8 +182,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* unlink_inode * * unlink_inode *
*===========================================================================*/ *===========================================================================*/
void unlink_inode(ino) void unlink_inode(struct inode *ino)
struct inode *ino;
{ {
/* Unlink an inode from its parent. If both reference and link count have /* Unlink an inode from its parent. If both reference and link count have
* reached zero, mark the inode as cached or free. This function should only * reached zero, mark the inode as cached or free. This function should only
@ -212,7 +207,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* get_free_inode * * get_free_inode *
*===========================================================================*/ *===========================================================================*/
struct inode *get_free_inode() struct inode *get_free_inode(void)
{ {
/* Return a free inode object (with reference count 1), if available. /* Return a free inode object (with reference count 1), if available.
*/ */
@ -249,7 +244,7 @@ struct inode *get_free_inode()
/*===========================================================================* /*===========================================================================*
* have_free_inode * * have_free_inode *
*===========================================================================*/ *===========================================================================*/
int have_free_inode() int have_free_inode(void)
{ {
/* Check whether there are any free inodes at the moment. Kind of lame, but /* Check whether there are any free inodes at the moment. Kind of lame, but
* this allows for easier error recovery in some places. * this allows for easier error recovery in some places.
@ -261,7 +256,7 @@ int have_free_inode()
/*===========================================================================* /*===========================================================================*
* have_used_inode * * have_used_inode *
*===========================================================================*/ *===========================================================================*/
int have_used_inode() int have_used_inode(void)
{ {
/* Check whether any inodes are still in use, that is, any of the inodes have /* Check whether any inodes are still in use, that is, any of the inodes have
* a reference count larger than zero. * a reference count larger than zero.
@ -278,7 +273,7 @@ int have_used_inode()
/*===========================================================================* /*===========================================================================*
* do_putnode * * do_putnode *
*===========================================================================*/ *===========================================================================*/
int do_putnode() int do_putnode(void)
{ {
/* Decrease an inode's reference count. /* Decrease an inode's reference count.
*/ */

View file

@ -20,7 +20,7 @@ static int force_remove(char *path, int dir);
/*===========================================================================* /*===========================================================================*
* do_create * * do_create *
*===========================================================================*/ *===========================================================================*/
int do_create() int do_create(void)
{ {
/* Create a new file. /* Create a new file.
*/ */
@ -129,7 +129,7 @@ int do_create()
/*===========================================================================* /*===========================================================================*
* do_mkdir * * do_mkdir *
*===========================================================================*/ *===========================================================================*/
int do_mkdir() int do_mkdir(void)
{ {
/* Make a new directory. /* Make a new directory.
*/ */
@ -178,9 +178,10 @@ int do_mkdir()
/*===========================================================================* /*===========================================================================*
* force_remove * * force_remove *
*===========================================================================*/ *===========================================================================*/
static int force_remove(path, dir) static int force_remove(
char *path; /* path to file or directory */ char *path, /* path to file or directory */
int dir; /* TRUE iff directory */ int dir /* TRUE iff directory */
)
{ {
/* Remove a file or directory. Wrapper around unlink and rmdir that makes the /* Remove a file or directory. Wrapper around unlink and rmdir that makes the
* target temporarily writable if the operation fails with an access denied * target temporarily writable if the operation fails with an access denied
@ -233,7 +234,7 @@ int dir; /* TRUE iff directory */
/*===========================================================================* /*===========================================================================*
* do_unlink * * do_unlink *
*===========================================================================*/ *===========================================================================*/
int do_unlink() int do_unlink(void)
{ {
/* Delete a file. /* Delete a file.
*/ */
@ -280,7 +281,7 @@ int do_unlink()
/*===========================================================================* /*===========================================================================*
* do_rmdir * * do_rmdir *
*===========================================================================*/ *===========================================================================*/
int do_rmdir() int do_rmdir(void)
{ {
/* Remove an empty directory. /* Remove an empty directory.
*/ */
@ -328,7 +329,7 @@ int do_rmdir()
/*===========================================================================* /*===========================================================================*
* do_rename * * do_rename *
*===========================================================================*/ *===========================================================================*/
int do_rename() int do_rename(void)
{ {
/* Rename a file or directory. /* Rename a file or directory.
*/ */

View file

@ -10,19 +10,24 @@
#include "inc.h" #include "inc.h"
static int get_mask(vfs_ucred_t *ucred); static int get_mask(vfs_ucred_t *ucred);
static int access_as_dir(struct inode *ino, struct sffs_attr *attr, int
uid, int mask); static int access_as_dir(struct inode *ino, struct sffs_attr *attr,
int uid, int mask);
static int next_name(char **ptr, char **start, char name[NAME_MAX+1]); static int next_name(char **ptr, char **start, char name[NAME_MAX+1]);
static int go_up(char path[PATH_MAX], struct inode *ino, struct inode
**res_ino, struct sffs_attr *attr); static int go_up(char path[PATH_MAX], struct inode *ino,
struct inode **res_ino, struct sffs_attr *attr);
static int go_down(char path[PATH_MAX], struct inode *ino, char *name, static int go_down(char path[PATH_MAX], struct inode *ino, char *name,
struct inode **res_ino, struct sffs_attr *attr); struct inode **res_ino, struct sffs_attr *attr);
/*===========================================================================* /*===========================================================================*
* get_mask * * get_mask *
*===========================================================================*/ *===========================================================================*/
static int get_mask(ucred) static int get_mask(
vfs_ucred_t *ucred; /* credentials of the caller */ vfs_ucred_t *ucred /* credentials of the caller */
)
{ {
/* Given the caller's credentials, precompute a search access mask to test /* Given the caller's credentials, precompute a search access mask to test
* against directory modes. * against directory modes.
@ -42,11 +47,12 @@ vfs_ucred_t *ucred; /* credentials of the caller */
/*===========================================================================* /*===========================================================================*
* access_as_dir * * access_as_dir *
*===========================================================================*/ *===========================================================================*/
static int access_as_dir(ino, attr, uid, mask) static int access_as_dir(
struct inode *ino; /* the inode to test */ struct inode *ino, /* the inode to test */
struct sffs_attr *attr; /* attributes of the inode */ struct sffs_attr *attr, /* attributes of the inode */
int uid; /* UID of the caller */ int uid, /* UID of the caller */
int mask; /* search access mask of the caller */ int mask /* search access mask of the caller */
)
{ {
/* Check whether the given inode may be accessed as directory. /* Check whether the given inode may be accessed as directory.
* Return OK or an appropriate error code. * Return OK or an appropriate error code.
@ -69,10 +75,11 @@ int mask; /* search access mask of the caller */
/*===========================================================================* /*===========================================================================*
* next_name * * next_name *
*===========================================================================*/ *===========================================================================*/
static int next_name(ptr, start, name) static int next_name(
char **ptr; /* cursor pointer into path (in, out) */ char **ptr, /* cursor pointer into path (in, out) */
char **start; /* place to store start of name */ char **start, /* place to store start of name */
char name[NAME_MAX+1]; /* place to store name */ char name[NAME_MAX+1] /* place to store name */
)
{ {
/* Get the next path component from a path. /* Get the next path component from a path.
*/ */
@ -102,11 +109,12 @@ char name[NAME_MAX+1]; /* place to store name */
/*===========================================================================* /*===========================================================================*
* go_up * * go_up *
*===========================================================================*/ *===========================================================================*/
static int go_up(path, ino, res_ino, attr) static int go_up(
char path[PATH_MAX]; /* path to take the last part from */ char path[PATH_MAX], /* path to take the last part from */
struct inode *ino; /* inode of the current directory */ struct inode *ino, /* inode of the current directory */
struct inode **res_ino; /* place to store resulting inode */ struct inode **res_ino, /* place to store resulting inode */
struct sffs_attr *attr; /* place to store inode attributes */ struct sffs_attr *attr /* place to store inode attributes */
)
{ {
/* Given an inode, progress into the parent directory. /* Given an inode, progress into the parent directory.
*/ */
@ -131,12 +139,13 @@ struct sffs_attr *attr; /* place to store inode attributes */
/*===========================================================================* /*===========================================================================*
* go_down * * go_down *
*===========================================================================*/ *===========================================================================*/
static int go_down(path, parent, name, res_ino, attr) static int go_down(
char path[PATH_MAX]; /* path to add the name to */ char path[PATH_MAX], /* path to add the name to */
struct inode *parent; /* inode of the current directory */ struct inode *parent, /* inode of the current directory */
char *name; /* name of the directory entry */ char *name, /* name of the directory entry */
struct inode **res_ino; /* place to store resulting inode */ struct inode **res_ino, /* place to store resulting inode */
struct sffs_attr *attr; /* place to store inode attributes */ struct sffs_attr *attr /* place to store inode attributes */
)
{ {
/* Given a directory inode and a name, progress into a directory entry. /* Given a directory inode and a name, progress into a directory entry.
*/ */
@ -190,7 +199,7 @@ struct sffs_attr *attr; /* place to store inode attributes */
/*===========================================================================* /*===========================================================================*
* do_lookup * * do_lookup *
*===========================================================================*/ *===========================================================================*/
int do_lookup() int do_lookup(void)
{ {
/* Resolve a path string to an inode. /* Resolve a path string to an inode.
*/ */

View file

@ -64,8 +64,7 @@ void sffs_signal(int signo)
/*===========================================================================* /*===========================================================================*
* get_work * * get_work *
*===========================================================================*/ *===========================================================================*/
static int get_work(who_e) static int get_work(endpoint_t *who_e)
endpoint_t *who_e;
{ {
/* Receive a request message from VFS. Return TRUE if a new message is ready /* Receive a request message from VFS. Return TRUE if a new message is ready
* to be processed, or FALSE if sef_stop() was called from the signal handler. * to be processed, or FALSE if sef_stop() was called from the signal handler.
@ -86,9 +85,10 @@ endpoint_t *who_e;
/*===========================================================================* /*===========================================================================*
* send_reply * * send_reply *
*===========================================================================*/ *===========================================================================*/
static void send_reply(err, transid) static void send_reply(
int err; /* resulting error code */ int err, /* resulting error code */
int transid; int transid
)
{ {
/* Send a reply message to the requesting party, with the given error code. /* Send a reply message to the requesting party, with the given error code.
*/ */

View file

@ -14,7 +14,7 @@
/*===========================================================================* /*===========================================================================*
* do_statvfs * * do_statvfs *
*===========================================================================*/ *===========================================================================*/
int do_statvfs() int do_statvfs(void)
{ {
/* Retrieve file system statistics. /* Retrieve file system statistics.
*/ */

View file

@ -13,7 +13,7 @@
/*===========================================================================* /*===========================================================================*
* do_readsuper * * do_readsuper *
*===========================================================================*/ *===========================================================================*/
int do_readsuper() int do_readsuper(void)
{ {
/* Mount the file system. /* Mount the file system.
*/ */
@ -72,7 +72,7 @@ int do_readsuper()
/*===========================================================================* /*===========================================================================*
* do_unmount * * do_unmount *
*===========================================================================*/ *===========================================================================*/
int do_unmount() int do_unmount(void)
{ {
/* Unmount the file system. /* Unmount the file system.
*/ */

View file

@ -15,9 +15,7 @@
/*===========================================================================* /*===========================================================================*
* normalize_name * * normalize_name *
*===========================================================================*/ *===========================================================================*/
void normalize_name(dst, src) void normalize_name(char dst[NAME_MAX+1], char *src)
char dst[NAME_MAX+1];
char *src;
{ {
/* Normalize the given path component name, storing the result in the given /* Normalize the given path component name, storing the result in the given
* buffer. * buffer.
@ -38,9 +36,7 @@ char *src;
/*===========================================================================* /*===========================================================================*
* compare_name * * compare_name *
*===========================================================================*/ *===========================================================================*/
int compare_name(name1, name2) int compare_name(char *name1, char *name2)
char *name1;
char *name2;
{ {
/* Return TRUE if the given path component names are equivalent, FALSE /* Return TRUE if the given path component names are equivalent, FALSE
* otherwise. * otherwise.

View file

@ -14,9 +14,7 @@
/*===========================================================================* /*===========================================================================*
* make_path * * make_path *
*===========================================================================*/ *===========================================================================*/
int make_path(path, ino) int make_path(char path[PATH_MAX], struct inode *ino)
char path[PATH_MAX];
struct inode *ino;
{ {
/* Given an inode, construct the path identifying that inode. /* Given an inode, construct the path identifying that inode.
*/ */
@ -69,9 +67,7 @@ struct inode *ino;
/*===========================================================================* /*===========================================================================*
* push_path * * push_path *
*===========================================================================*/ *===========================================================================*/
int push_path(path, name) int push_path(char path[PATH_MAX], char *name)
char path[PATH_MAX];
char *name;
{ {
/* Add a component to the end of a path. /* Add a component to the end of a path.
*/ */
@ -93,8 +89,7 @@ char *name;
/*===========================================================================* /*===========================================================================*
* pop_path * * pop_path *
*===========================================================================*/ *===========================================================================*/
void pop_path(path) void pop_path(char path[PATH_MAX])
char path[PATH_MAX];
{ {
/* Remove the last component from a path. /* Remove the last component from a path.
*/ */

View file

@ -17,7 +17,7 @@
/*===========================================================================* /*===========================================================================*
* do_read * * do_read *
*===========================================================================*/ *===========================================================================*/
int do_read() int do_read(void)
{ {
/* Read data from a file. /* Read data from a file.
*/ */
@ -77,7 +77,7 @@ int do_read()
/*===========================================================================* /*===========================================================================*
* do_getdents * * do_getdents *
*===========================================================================*/ *===========================================================================*/
int do_getdents() int do_getdents(void)
{ {
/* Retrieve directory entries. /* Retrieve directory entries.
*/ */

View file

@ -15,9 +15,7 @@
/*===========================================================================* /*===========================================================================*
* get_mode * * get_mode *
*===========================================================================*/ *===========================================================================*/
pmode_t get_mode(ino, mode) pmode_t get_mode(struct inode *ino, int mode)
struct inode *ino;
int mode;
{ {
/* Return the mode for an inode, given the inode and the retrieved mode. /* Return the mode for an inode, given the inode and the retrieved mode.
*/ */
@ -39,7 +37,7 @@ int mode;
/*===========================================================================* /*===========================================================================*
* do_stat * * do_stat *
*===========================================================================*/ *===========================================================================*/
int do_stat() int do_stat(void)
{ {
/* Retrieve inode status. /* Retrieve inode status.
*/ */
@ -103,7 +101,7 @@ int do_stat()
/*===========================================================================* /*===========================================================================*
* do_chmod * * do_chmod *
*===========================================================================*/ *===========================================================================*/
int do_chmod() int do_chmod(void)
{ {
/* Change file mode. /* Change file mode.
*/ */
@ -140,7 +138,7 @@ int do_chmod()
/*===========================================================================* /*===========================================================================*
* do_utime * * do_utime *
*===========================================================================*/ *===========================================================================*/
int do_utime() int do_utime(void)
{ {
/* Set file times. /* Set file times.
*/ */

View file

@ -14,10 +14,11 @@
/*===========================================================================* /*===========================================================================*
* get_name * * get_name *
*===========================================================================*/ *===========================================================================*/
int get_name(grant, len, name) int get_name(
cp_grant_id_t grant; /* memory grant for the path component */ cp_grant_id_t grant, /* memory grant for the path component */
size_t len; /* length of the name, including '\0' */ size_t len, /* length of the name, including '\0' */
char name[NAME_MAX+1]; /* buffer in which store the result */ char name[NAME_MAX+1] /* buffer in which store the result */
)
{ {
/* Retrieve a path component from the caller, using a given grant. /* Retrieve a path component from the caller, using a given grant.
*/ */
@ -43,7 +44,7 @@ char name[NAME_MAX+1]; /* buffer in which store the result */
/*===========================================================================* /*===========================================================================*
* do_noop * * do_noop *
*===========================================================================*/ *===========================================================================*/
int do_noop() int do_noop(void)
{ {
/* Generic handler for no-op system calls. /* Generic handler for no-op system calls.
*/ */
@ -54,7 +55,7 @@ int do_noop()
/*===========================================================================* /*===========================================================================*
* no_sys * * no_sys *
*===========================================================================*/ *===========================================================================*/
int no_sys() int no_sys(void)
{ {
/* Generic handler for unimplemented system calls. /* Generic handler for unimplemented system calls.
*/ */

View file

@ -14,11 +14,8 @@
/*===========================================================================* /*===========================================================================*
* verify_path * * verify_path *
*===========================================================================*/ *===========================================================================*/
int verify_path(path, ino, attr, stale) int verify_path(char path[PATH_MAX], struct inode *ino,
char path[PATH_MAX]; struct sffs_attr *attr, int *stale)
struct inode *ino;
struct sffs_attr *attr;
int *stale;
{ {
/* Given a path, and the inode associated with that path, verify if the inode /* Given a path, and the inode associated with that path, verify if the inode
* still matches the real world. Obtain the attributes of the file identified * still matches the real world. Obtain the attributes of the file identified
@ -61,10 +58,11 @@ int *stale;
/*===========================================================================* /*===========================================================================*
* verify_inode * * verify_inode *
*===========================================================================*/ *===========================================================================*/
int verify_inode(ino, path, attr) int verify_inode(
struct inode *ino; /* inode to verify */ struct inode *ino, /* inode to verify */
char path[PATH_MAX]; /* buffer in which to store the path */ char path[PATH_MAX], /* buffer in which to store the path */
struct sffs_attr *attr; /* buffer for attributes, or NULL */ struct sffs_attr *attr /* buffer for attributes, or NULL */
)
{ {
/* Given an inode, construct a path identifying the inode, and check whether /* Given an inode, construct a path identifying the inode, and check whether
* that path is still valid for that inode (as far as we can tell). As a side * that path is still valid for that inode (as far as we can tell). As a side
@ -88,11 +86,12 @@ struct sffs_attr *attr; /* buffer for attributes, or NULL */
/*===========================================================================* /*===========================================================================*
* verify_dentry * * verify_dentry *
*===========================================================================*/ *===========================================================================*/
int verify_dentry(parent, name, path, res_ino) int verify_dentry(
struct inode *parent; /* parent inode: the inode to verify */ struct inode *parent, /* parent inode: the inode to verify */
char name[NAME_MAX+1]; /* the given directory entry path component */ char name[NAME_MAX+1], /* the given directory entry path component */
char path[PATH_MAX]; /* buffer to store the resulting path in */ char path[PATH_MAX], /* buffer to store the resulting path in */
struct inode **res_ino; /* pointer for addressed inode (or NULL) */ struct inode **res_ino /* pointer for addressed inode (or NULL) */
)
{ {
/* Given a directory inode and a name, construct a path identifying that /* Given a directory inode and a name, construct a path identifying that
* directory entry, check whether the path to the parent is still valid, and * directory entry, check whether the path to the parent is still valid, and

View file

@ -16,11 +16,8 @@ static int write_file(struct inode *ino, u64_t *posp, size_t *countp,
/*===========================================================================* /*===========================================================================*
* write_file * * write_file *
*===========================================================================*/ *===========================================================================*/
static int write_file(ino, posp, countp, grantp) static int write_file(struct inode *ino, u64_t *posp, size_t *countp,
struct inode *ino; cp_grant_id_t *grantp)
u64_t *posp;
size_t *countp;
cp_grant_id_t *grantp;
{ {
/* Write data or zeroes to a file, depending on whether a valid pointer to /* Write data or zeroes to a file, depending on whether a valid pointer to
* a data grant was provided. * a data grant was provided.
@ -79,7 +76,7 @@ cp_grant_id_t *grantp;
/*===========================================================================* /*===========================================================================*
* do_write * * do_write *
*===========================================================================*/ *===========================================================================*/
int do_write() int do_write(void)
{ {
/* Write data to a file. /* Write data to a file.
*/ */
@ -116,7 +113,7 @@ int do_write()
/*===========================================================================* /*===========================================================================*
* do_ftrunc * * do_ftrunc *
*===========================================================================*/ *===========================================================================*/
int do_ftrunc() int do_ftrunc(void)
{ {
/* Change file size or create file holes. /* Change file size or create file holes.
*/ */

View file

@ -45,7 +45,7 @@ static void reset(void);
static void clear_tbl(void); static void clear_tbl(void);
void procentry (char *name) void procentry(char *name)
{ {
static int init = 0; static int init = 0;
unsigned hash = 0, x = 0; unsigned hash = 0, x = 0;
@ -168,7 +168,7 @@ void procentry (char *name)
} }
void procexit (char *UNUSED(name)) void procexit(char *UNUSED(name))
{ {
u64_t stop, spent; u64_t stop, spent;
u32_t tsc_lo, tsc_hi; u32_t tsc_lo, tsc_hi;
@ -224,7 +224,7 @@ void procexit (char *UNUSED(name))
} }
static void cprof_init() static void cprof_init(void)
{ {
int i; int i;
@ -247,14 +247,14 @@ static void cprof_init()
} }
static void reset() static void reset(void)
{ {
clear_tbl(); clear_tbl();
control.reset = 0; control.reset = 0;
} }
static void clear_tbl() static void clear_tbl(void)
{ {
int i; int i;

View file

@ -9,9 +9,7 @@ static char *find_key(const char *params, const char *key);
/*===========================================================================* /*===========================================================================*
* env_setargs * * env_setargs *
*===========================================================================*/ *===========================================================================*/
void env_setargs(arg_c, arg_v) void env_setargs(int arg_c, char *arg_v[])
int arg_c;
char *arg_v[];
{ {
env_argc= arg_c; env_argc= arg_c;
env_argv= arg_v; env_argv= arg_v;
@ -77,12 +75,10 @@ int env_get_param(const char *key, char *value, int max_len)
/*==========================================================================* /*==========================================================================*
* find_key * * find_key *
*==========================================================================*/ *==========================================================================*/
static char *find_key(params,name) static char *find_key(const char *params, const char *name)
const char *params;
const char *name;
{ {
register const char *namep; const char *namep;
register char *envp; char *envp;
for (envp = (char *) params; *envp != 0;) { for (envp = (char *) params; *envp != 0;) {
for (namep = name; *namep != 0 && *namep == *envp; namep++, envp++) for (namep = name; *namep != 0 && *namep == *envp; namep++, envp++)

View file

@ -18,16 +18,12 @@
#include <minix/const.h> #include <minix/const.h>
#include <minix/optset.h> #include <minix/optset.h>
static void optset_parse_entry(struct optset *entry, char *ptr, int static void optset_parse_entry(struct optset *entry, char *ptr, int len);
len);
/*===========================================================================* /*===========================================================================*
* optset_parse_entry * * optset_parse_entry *
*===========================================================================*/ *===========================================================================*/
static void optset_parse_entry(entry, ptr, len) static void optset_parse_entry(struct optset *entry, char *ptr, int len)
struct optset *entry;
char *ptr;
int len;
{ {
/* Parse and store the value of a single option. /* Parse and store the value of a single option.
*/ */
@ -67,9 +63,7 @@ int len;
/*===========================================================================* /*===========================================================================*
* optset_parse * * optset_parse *
*===========================================================================*/ *===========================================================================*/
void optset_parse(table, string) void optset_parse(struct optset *table, char *string)
struct optset *table;
char *string;
{ {
/* Parse a string of options, using the provided table of optset entries. /* Parse a string of options, using the provided table of optset entries.
*/ */

View file

@ -40,7 +40,7 @@ EXTERN int sef_self_first_receive_done;
/*===========================================================================* /*===========================================================================*
* do_sef_lu_before_receive * * do_sef_lu_before_receive *
*===========================================================================*/ *===========================================================================*/
void do_sef_lu_before_receive() void do_sef_lu_before_receive(void)
{ {
/* Handle SEF Live update before receive events. */ /* Handle SEF Live update before receive events. */
int r; int r;

View file

@ -61,8 +61,7 @@ void libvassert_process_backdoor(uint32, uint32, uint32, reg_t *, reg_t *,
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
static void static void sig_segv(int sig_no)
sig_segv(int sig_no)
{ {
/* jumping to error handling in VAssert_IsInVM. */ /* jumping to error handling in VAssert_IsInVM. */
siglongjmp(segv_jmp, 1); siglongjmp(segv_jmp, 1);
@ -86,8 +85,7 @@ sig_segv(int sig_no)
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
static Bool static Bool VAssert_IsInVM(void)
VAssert_IsInVM(void)
{ {
uint32 eax, ebx, ecx, edx; uint32 eax, ebx, ecx, edx;
static Bool inVM = FALSE; static Bool inVM = FALSE;
@ -128,8 +126,7 @@ VAssert_IsInVM(void)
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
char char VAssert_Init(void)
VAssert_Init(void)
{ {
uint32 eax, ebx, ecx, edx; uint32 eax, ebx, ecx, edx;
VA page_address = (VA) &vassert_state.inReplay; VA page_address = (VA) &vassert_state.inReplay;
@ -168,8 +165,7 @@ VAssert_Init(void)
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
char char VAssert_Uninit(void)
VAssert_Uninit(void)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
if (!VAssert_IsInVM()) { if (!VAssert_IsInVM()) {
@ -197,8 +193,7 @@ VAssert_Uninit(void)
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
void void VAssert_LogMain(const char *format, ...)
VAssert_LogMain(const char *format, ...)
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
char buf[LOG_MAX]; char buf[LOG_MAX];
@ -231,8 +226,7 @@ VAssert_LogMain(const char *format, ...)
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
void void VAssert_GoLiveMain(void)
VAssert_GoLiveMain()
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
vassert_state.inReplay = 0; vassert_state.inReplay = 0;
@ -256,8 +250,7 @@ VAssert_GoLiveMain()
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
void void VAssert_ReturnToReplayMain(void)
VAssert_ReturnToReplayMain()
{ {
unsigned int eax, ebx, ecx, edx; unsigned int eax, ebx, ecx, edx;
libvassert_process_backdoor(CMD_RETURN_REPLAY, 0, MAGIC_PORT, &eax, &ebx, &ecx, &edx); libvassert_process_backdoor(CMD_RETURN_REPLAY, 0, MAGIC_PORT, &eax, &ebx, &ecx, &edx);
@ -281,8 +274,7 @@ VAssert_ReturnToReplayMain()
*--------------------------------------------------------------------- *---------------------------------------------------------------------
*/ */
char char VAssert_SetRecordingMain(char start)
VAssert_SetRecordingMain(char start)
{ {
uint32 eax, ebx, ecx, edx; uint32 eax, ebx, ecx, edx;
if (!VAssert_IsInVM()) { if (!VAssert_IsInVM()) {