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:
+6
-15
@@ -20,7 +20,7 @@ static unsigned int hash_dentry(struct inode *parent, char *name);
|
||||
/*===========================================================================*
|
||||
* init_dentry *
|
||||
*===========================================================================*/
|
||||
void init_dentry()
|
||||
void init_dentry(void)
|
||||
{
|
||||
/* Initialize the names hashtable.
|
||||
*/
|
||||
@@ -33,9 +33,7 @@ void init_dentry()
|
||||
/*===========================================================================*
|
||||
* lookup_dentry *
|
||||
*===========================================================================*/
|
||||
struct inode *lookup_dentry(parent, name)
|
||||
struct inode *parent;
|
||||
char *name;
|
||||
struct inode *lookup_dentry(struct inode *parent, char *name)
|
||||
{
|
||||
/* Given a directory inode and a component name, look up the inode associated
|
||||
* with that directory entry. Return the inode (with increased reference
|
||||
@@ -64,10 +62,7 @@ char *name;
|
||||
/*===========================================================================*
|
||||
* add_dentry *
|
||||
*===========================================================================*/
|
||||
void add_dentry(parent, name, ino)
|
||||
struct inode *parent;
|
||||
char *name;
|
||||
struct inode *ino;
|
||||
void add_dentry(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
|
||||
* name. An entry with this name must not already exist.
|
||||
@@ -92,8 +87,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* del_one_dentry *
|
||||
*===========================================================================*/
|
||||
static void del_one_dentry(ino)
|
||||
struct inode *ino;
|
||||
static void del_one_dentry(struct inode *ino)
|
||||
{
|
||||
/* This inode has become inaccessible by name. Disassociate it from its parent
|
||||
* and remove it from the names hash table.
|
||||
@@ -123,8 +117,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* del_dentry *
|
||||
*===========================================================================*/
|
||||
void del_dentry(ino)
|
||||
struct inode *ino;
|
||||
void del_dentry(struct inode *ino)
|
||||
{
|
||||
/* Disassociate an inode from its parent, effectively deleting it. Recursively
|
||||
* delete all its children as well, fragmenting the deleted branch into single
|
||||
@@ -167,9 +160,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* hash_dentry *
|
||||
*===========================================================================*/
|
||||
static unsigned int hash_dentry(parent, name)
|
||||
struct inode *parent;
|
||||
char *name;
|
||||
static unsigned int hash_dentry(struct inode *parent, char *name)
|
||||
{
|
||||
/* 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.
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
/*===========================================================================*
|
||||
* get_handle *
|
||||
*===========================================================================*/
|
||||
int get_handle(ino)
|
||||
struct inode *ino;
|
||||
int get_handle(struct inode *ino)
|
||||
{
|
||||
/* Get an open file or directory handle for an inode.
|
||||
*/
|
||||
@@ -55,8 +54,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* put_handle *
|
||||
*===========================================================================*/
|
||||
void put_handle(ino)
|
||||
struct inode *ino;
|
||||
void put_handle(struct inode *ino)
|
||||
{
|
||||
/* Close an open file or directory handle associated with an inode.
|
||||
*/
|
||||
|
||||
+9
-14
@@ -25,7 +25,7 @@ static TAILQ_HEAD(free_head, inode) free_list;
|
||||
/*===========================================================================*
|
||||
* init_inode *
|
||||
*===========================================================================*/
|
||||
struct inode *init_inode()
|
||||
struct inode *init_inode(void)
|
||||
{
|
||||
/* Initialize inode table. Return the root inode.
|
||||
*/
|
||||
@@ -101,8 +101,7 @@ struct inode *find_inode(pino_t ino_nr)
|
||||
/*===========================================================================*
|
||||
* get_inode *
|
||||
*===========================================================================*/
|
||||
void get_inode(ino)
|
||||
struct inode *ino;
|
||||
void get_inode(struct inode *ino)
|
||||
{
|
||||
/* Increase the given inode's reference count. If both reference and link
|
||||
* count were zero before, remove the inode from the free list.
|
||||
@@ -125,8 +124,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* put_inode *
|
||||
*===========================================================================*/
|
||||
void put_inode(ino)
|
||||
struct inode *ino;
|
||||
void put_inode(struct inode *ino)
|
||||
{
|
||||
/* 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
|
||||
@@ -165,9 +163,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* link_inode *
|
||||
*===========================================================================*/
|
||||
void link_inode(parent, ino)
|
||||
struct inode *parent;
|
||||
struct inode *ino;
|
||||
void link_inode(struct inode *parent, struct inode *ino)
|
||||
{
|
||||
/* 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
|
||||
@@ -186,8 +182,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* unlink_inode *
|
||||
*===========================================================================*/
|
||||
void unlink_inode(ino)
|
||||
struct inode *ino;
|
||||
void unlink_inode(struct inode *ino)
|
||||
{
|
||||
/* 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
|
||||
@@ -212,7 +207,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* 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.
|
||||
*/
|
||||
@@ -249,7 +244,7 @@ struct inode *get_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
|
||||
* this allows for easier error recovery in some places.
|
||||
@@ -261,7 +256,7 @@ int have_free_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
|
||||
* a reference count larger than zero.
|
||||
@@ -278,7 +273,7 @@ int have_used_inode()
|
||||
/*===========================================================================*
|
||||
* do_putnode *
|
||||
*===========================================================================*/
|
||||
int do_putnode()
|
||||
int do_putnode(void)
|
||||
{
|
||||
/* Decrease an inode's reference count.
|
||||
*/
|
||||
|
||||
+9
-8
@@ -20,7 +20,7 @@ static int force_remove(char *path, int dir);
|
||||
/*===========================================================================*
|
||||
* do_create *
|
||||
*===========================================================================*/
|
||||
int do_create()
|
||||
int do_create(void)
|
||||
{
|
||||
/* Create a new file.
|
||||
*/
|
||||
@@ -129,7 +129,7 @@ int do_create()
|
||||
/*===========================================================================*
|
||||
* do_mkdir *
|
||||
*===========================================================================*/
|
||||
int do_mkdir()
|
||||
int do_mkdir(void)
|
||||
{
|
||||
/* Make a new directory.
|
||||
*/
|
||||
@@ -178,9 +178,10 @@ int do_mkdir()
|
||||
/*===========================================================================*
|
||||
* force_remove *
|
||||
*===========================================================================*/
|
||||
static int force_remove(path, dir)
|
||||
char *path; /* path to file or directory */
|
||||
int dir; /* TRUE iff directory */
|
||||
static int force_remove(
|
||||
char *path, /* path to file or directory */
|
||||
int dir /* TRUE iff directory */
|
||||
)
|
||||
{
|
||||
/* Remove a file or directory. Wrapper around unlink and rmdir that makes the
|
||||
* target temporarily writable if the operation fails with an access denied
|
||||
@@ -233,7 +234,7 @@ int dir; /* TRUE iff directory */
|
||||
/*===========================================================================*
|
||||
* do_unlink *
|
||||
*===========================================================================*/
|
||||
int do_unlink()
|
||||
int do_unlink(void)
|
||||
{
|
||||
/* Delete a file.
|
||||
*/
|
||||
@@ -280,7 +281,7 @@ int do_unlink()
|
||||
/*===========================================================================*
|
||||
* do_rmdir *
|
||||
*===========================================================================*/
|
||||
int do_rmdir()
|
||||
int do_rmdir(void)
|
||||
{
|
||||
/* Remove an empty directory.
|
||||
*/
|
||||
@@ -328,7 +329,7 @@ int do_rmdir()
|
||||
/*===========================================================================*
|
||||
* do_rename *
|
||||
*===========================================================================*/
|
||||
int do_rename()
|
||||
int do_rename(void)
|
||||
{
|
||||
/* Rename a file or directory.
|
||||
*/
|
||||
|
||||
+36
-27
@@ -10,19 +10,24 @@
|
||||
#include "inc.h"
|
||||
|
||||
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 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,
|
||||
struct inode **res_ino, struct sffs_attr *attr);
|
||||
|
||||
/*===========================================================================*
|
||||
* get_mask *
|
||||
*===========================================================================*/
|
||||
static int get_mask(ucred)
|
||||
vfs_ucred_t *ucred; /* credentials of the caller */
|
||||
static int get_mask(
|
||||
vfs_ucred_t *ucred /* credentials of the caller */
|
||||
)
|
||||
{
|
||||
/* Given the caller's credentials, precompute a search access mask to test
|
||||
* against directory modes.
|
||||
@@ -42,11 +47,12 @@ vfs_ucred_t *ucred; /* credentials of the caller */
|
||||
/*===========================================================================*
|
||||
* access_as_dir *
|
||||
*===========================================================================*/
|
||||
static int access_as_dir(ino, attr, uid, mask)
|
||||
struct inode *ino; /* the inode to test */
|
||||
struct sffs_attr *attr; /* attributes of the inode */
|
||||
int uid; /* UID of the caller */
|
||||
int mask; /* search access mask of the caller */
|
||||
static int access_as_dir(
|
||||
struct inode *ino, /* the inode to test */
|
||||
struct sffs_attr *attr, /* attributes of the inode */
|
||||
int uid, /* UID of the caller */
|
||||
int mask /* search access mask of the caller */
|
||||
)
|
||||
{
|
||||
/* Check whether the given inode may be accessed as directory.
|
||||
* Return OK or an appropriate error code.
|
||||
@@ -69,10 +75,11 @@ int mask; /* search access mask of the caller */
|
||||
/*===========================================================================*
|
||||
* next_name *
|
||||
*===========================================================================*/
|
||||
static int next_name(ptr, start, name)
|
||||
char **ptr; /* cursor pointer into path (in, out) */
|
||||
char **start; /* place to store start of name */
|
||||
char name[NAME_MAX+1]; /* place to store name */
|
||||
static int next_name(
|
||||
char **ptr, /* cursor pointer into path (in, out) */
|
||||
char **start, /* place to store start of name */
|
||||
char name[NAME_MAX+1] /* place to store name */
|
||||
)
|
||||
{
|
||||
/* Get the next path component from a path.
|
||||
*/
|
||||
@@ -102,11 +109,12 @@ char name[NAME_MAX+1]; /* place to store name */
|
||||
/*===========================================================================*
|
||||
* go_up *
|
||||
*===========================================================================*/
|
||||
static int go_up(path, ino, res_ino, attr)
|
||||
char path[PATH_MAX]; /* path to take the last part from */
|
||||
struct inode *ino; /* inode of the current directory */
|
||||
struct inode **res_ino; /* place to store resulting inode */
|
||||
struct sffs_attr *attr; /* place to store inode attributes */
|
||||
static int go_up(
|
||||
char path[PATH_MAX], /* path to take the last part from */
|
||||
struct inode *ino, /* inode of the current directory */
|
||||
struct inode **res_ino, /* place to store resulting inode */
|
||||
struct sffs_attr *attr /* place to store inode attributes */
|
||||
)
|
||||
{
|
||||
/* Given an inode, progress into the parent directory.
|
||||
*/
|
||||
@@ -131,12 +139,13 @@ struct sffs_attr *attr; /* place to store inode attributes */
|
||||
/*===========================================================================*
|
||||
* go_down *
|
||||
*===========================================================================*/
|
||||
static int go_down(path, parent, name, res_ino, attr)
|
||||
char path[PATH_MAX]; /* path to add the name to */
|
||||
struct inode *parent; /* inode of the current directory */
|
||||
char *name; /* name of the directory entry */
|
||||
struct inode **res_ino; /* place to store resulting inode */
|
||||
struct sffs_attr *attr; /* place to store inode attributes */
|
||||
static int go_down(
|
||||
char path[PATH_MAX], /* path to add the name to */
|
||||
struct inode *parent, /* inode of the current directory */
|
||||
char *name, /* name of the directory entry */
|
||||
struct inode **res_ino, /* place to store resulting inode */
|
||||
struct sffs_attr *attr /* place to store inode attributes */
|
||||
)
|
||||
{
|
||||
/* 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 *
|
||||
*===========================================================================*/
|
||||
int do_lookup()
|
||||
int do_lookup(void)
|
||||
{
|
||||
/* Resolve a path string to an inode.
|
||||
*/
|
||||
|
||||
+5
-5
@@ -64,8 +64,7 @@ void sffs_signal(int signo)
|
||||
/*===========================================================================*
|
||||
* get_work *
|
||||
*===========================================================================*/
|
||||
static int get_work(who_e)
|
||||
endpoint_t *who_e;
|
||||
static int get_work(endpoint_t *who_e)
|
||||
{
|
||||
/* 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.
|
||||
@@ -86,9 +85,10 @@ endpoint_t *who_e;
|
||||
/*===========================================================================*
|
||||
* send_reply *
|
||||
*===========================================================================*/
|
||||
static void send_reply(err, transid)
|
||||
int err; /* resulting error code */
|
||||
int transid;
|
||||
static void send_reply(
|
||||
int err, /* resulting error code */
|
||||
int transid
|
||||
)
|
||||
{
|
||||
/* Send a reply message to the requesting party, with the given error code.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* do_statvfs *
|
||||
*===========================================================================*/
|
||||
int do_statvfs()
|
||||
int do_statvfs(void)
|
||||
{
|
||||
/* Retrieve file system statistics.
|
||||
*/
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
/*===========================================================================*
|
||||
* do_readsuper *
|
||||
*===========================================================================*/
|
||||
int do_readsuper()
|
||||
int do_readsuper(void)
|
||||
{
|
||||
/* Mount the file system.
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ int do_readsuper()
|
||||
/*===========================================================================*
|
||||
* do_unmount *
|
||||
*===========================================================================*/
|
||||
int do_unmount()
|
||||
int do_unmount(void)
|
||||
{
|
||||
/* Unmount the file system.
|
||||
*/
|
||||
|
||||
+2
-6
@@ -15,9 +15,7 @@
|
||||
/*===========================================================================*
|
||||
* normalize_name *
|
||||
*===========================================================================*/
|
||||
void normalize_name(dst, src)
|
||||
char dst[NAME_MAX+1];
|
||||
char *src;
|
||||
void normalize_name(char dst[NAME_MAX+1], char *src)
|
||||
{
|
||||
/* Normalize the given path component name, storing the result in the given
|
||||
* buffer.
|
||||
@@ -38,9 +36,7 @@ char *src;
|
||||
/*===========================================================================*
|
||||
* compare_name *
|
||||
*===========================================================================*/
|
||||
int compare_name(name1, name2)
|
||||
char *name1;
|
||||
char *name2;
|
||||
int compare_name(char *name1, char *name2)
|
||||
{
|
||||
/* Return TRUE if the given path component names are equivalent, FALSE
|
||||
* otherwise.
|
||||
|
||||
+3
-8
@@ -14,9 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* make_path *
|
||||
*===========================================================================*/
|
||||
int make_path(path, ino)
|
||||
char path[PATH_MAX];
|
||||
struct inode *ino;
|
||||
int make_path(char path[PATH_MAX], struct inode *ino)
|
||||
{
|
||||
/* Given an inode, construct the path identifying that inode.
|
||||
*/
|
||||
@@ -69,9 +67,7 @@ struct inode *ino;
|
||||
/*===========================================================================*
|
||||
* push_path *
|
||||
*===========================================================================*/
|
||||
int push_path(path, name)
|
||||
char path[PATH_MAX];
|
||||
char *name;
|
||||
int push_path(char path[PATH_MAX], char *name)
|
||||
{
|
||||
/* Add a component to the end of a path.
|
||||
*/
|
||||
@@ -93,8 +89,7 @@ char *name;
|
||||
/*===========================================================================*
|
||||
* pop_path *
|
||||
*===========================================================================*/
|
||||
void pop_path(path)
|
||||
char path[PATH_MAX];
|
||||
void pop_path(char path[PATH_MAX])
|
||||
{
|
||||
/* Remove the last component from a path.
|
||||
*/
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@
|
||||
/*===========================================================================*
|
||||
* do_read *
|
||||
*===========================================================================*/
|
||||
int do_read()
|
||||
int do_read(void)
|
||||
{
|
||||
/* Read data from a file.
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ int do_read()
|
||||
/*===========================================================================*
|
||||
* do_getdents *
|
||||
*===========================================================================*/
|
||||
int do_getdents()
|
||||
int do_getdents(void)
|
||||
{
|
||||
/* Retrieve directory entries.
|
||||
*/
|
||||
|
||||
+4
-6
@@ -15,9 +15,7 @@
|
||||
/*===========================================================================*
|
||||
* get_mode *
|
||||
*===========================================================================*/
|
||||
pmode_t get_mode(ino, mode)
|
||||
struct inode *ino;
|
||||
int mode;
|
||||
pmode_t get_mode(struct inode *ino, int mode)
|
||||
{
|
||||
/* Return the mode for an inode, given the inode and the retrieved mode.
|
||||
*/
|
||||
@@ -39,7 +37,7 @@ int mode;
|
||||
/*===========================================================================*
|
||||
* do_stat *
|
||||
*===========================================================================*/
|
||||
int do_stat()
|
||||
int do_stat(void)
|
||||
{
|
||||
/* Retrieve inode status.
|
||||
*/
|
||||
@@ -103,7 +101,7 @@ int do_stat()
|
||||
/*===========================================================================*
|
||||
* do_chmod *
|
||||
*===========================================================================*/
|
||||
int do_chmod()
|
||||
int do_chmod(void)
|
||||
{
|
||||
/* Change file mode.
|
||||
*/
|
||||
@@ -140,7 +138,7 @@ int do_chmod()
|
||||
/*===========================================================================*
|
||||
* do_utime *
|
||||
*===========================================================================*/
|
||||
int do_utime()
|
||||
int do_utime(void)
|
||||
{
|
||||
/* Set file times.
|
||||
*/
|
||||
|
||||
+7
-6
@@ -14,10 +14,11 @@
|
||||
/*===========================================================================*
|
||||
* get_name *
|
||||
*===========================================================================*/
|
||||
int get_name(grant, len, name)
|
||||
cp_grant_id_t grant; /* memory grant for the path component */
|
||||
size_t len; /* length of the name, including '\0' */
|
||||
char name[NAME_MAX+1]; /* buffer in which store the result */
|
||||
int get_name(
|
||||
cp_grant_id_t grant, /* memory grant for the path component */
|
||||
size_t len, /* length of the name, including '\0' */
|
||||
char name[NAME_MAX+1] /* buffer in which store the result */
|
||||
)
|
||||
{
|
||||
/* 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 *
|
||||
*===========================================================================*/
|
||||
int do_noop()
|
||||
int do_noop(void)
|
||||
{
|
||||
/* Generic handler for no-op system calls.
|
||||
*/
|
||||
@@ -54,7 +55,7 @@ int do_noop()
|
||||
/*===========================================================================*
|
||||
* no_sys *
|
||||
*===========================================================================*/
|
||||
int no_sys()
|
||||
int no_sys(void)
|
||||
{
|
||||
/* Generic handler for unimplemented system calls.
|
||||
*/
|
||||
|
||||
+13
-14
@@ -14,11 +14,8 @@
|
||||
/*===========================================================================*
|
||||
* verify_path *
|
||||
*===========================================================================*/
|
||||
int verify_path(path, ino, attr, stale)
|
||||
char path[PATH_MAX];
|
||||
struct inode *ino;
|
||||
struct sffs_attr *attr;
|
||||
int *stale;
|
||||
int verify_path(char path[PATH_MAX], struct inode *ino,
|
||||
struct sffs_attr *attr, int *stale)
|
||||
{
|
||||
/* 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
|
||||
@@ -61,10 +58,11 @@ int *stale;
|
||||
/*===========================================================================*
|
||||
* verify_inode *
|
||||
*===========================================================================*/
|
||||
int verify_inode(ino, path, attr)
|
||||
struct inode *ino; /* inode to verify */
|
||||
char path[PATH_MAX]; /* buffer in which to store the path */
|
||||
struct sffs_attr *attr; /* buffer for attributes, or NULL */
|
||||
int verify_inode(
|
||||
struct inode *ino, /* inode to verify */
|
||||
char path[PATH_MAX], /* buffer in which to store the path */
|
||||
struct sffs_attr *attr /* buffer for attributes, or NULL */
|
||||
)
|
||||
{
|
||||
/* 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
|
||||
@@ -88,11 +86,12 @@ struct sffs_attr *attr; /* buffer for attributes, or NULL */
|
||||
/*===========================================================================*
|
||||
* verify_dentry *
|
||||
*===========================================================================*/
|
||||
int verify_dentry(parent, name, path, res_ino)
|
||||
struct inode *parent; /* parent inode: the inode to verify */
|
||||
char name[NAME_MAX+1]; /* the given directory entry path component */
|
||||
char path[PATH_MAX]; /* buffer to store the resulting path in */
|
||||
struct inode **res_ino; /* pointer for addressed inode (or NULL) */
|
||||
int verify_dentry(
|
||||
struct inode *parent, /* parent inode: the inode to verify */
|
||||
char name[NAME_MAX+1], /* the given directory entry path component */
|
||||
char path[PATH_MAX], /* buffer to store the resulting path in */
|
||||
struct inode **res_ino /* pointer for addressed inode (or NULL) */
|
||||
)
|
||||
{
|
||||
/* 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
|
||||
|
||||
+4
-7
@@ -16,11 +16,8 @@ static int write_file(struct inode *ino, u64_t *posp, size_t *countp,
|
||||
/*===========================================================================*
|
||||
* write_file *
|
||||
*===========================================================================*/
|
||||
static int write_file(ino, posp, countp, grantp)
|
||||
struct inode *ino;
|
||||
u64_t *posp;
|
||||
size_t *countp;
|
||||
cp_grant_id_t *grantp;
|
||||
static int write_file(struct inode *ino, 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
|
||||
* a data grant was provided.
|
||||
@@ -79,7 +76,7 @@ cp_grant_id_t *grantp;
|
||||
/*===========================================================================*
|
||||
* do_write *
|
||||
*===========================================================================*/
|
||||
int do_write()
|
||||
int do_write(void)
|
||||
{
|
||||
/* Write data to a file.
|
||||
*/
|
||||
@@ -116,7 +113,7 @@ int do_write()
|
||||
/*===========================================================================*
|
||||
* do_ftrunc *
|
||||
*===========================================================================*/
|
||||
int do_ftrunc()
|
||||
int do_ftrunc(void)
|
||||
{
|
||||
/* Change file size or create file holes.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user