diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-23 11:24:29 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:31:21 +0200 |
commit | 0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (patch) | |
tree | fbcadf8294b3314bb0a924339c00bc7bb89d6d79 /procfs.c | |
parent | a269783a41ae8b18e5b24d934c96ce9e90de3067 (diff) | |
download | hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.tar.gz hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.tar.bz2 hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.zip |
Make contents a char* to avoid typecasts all over the place
* procfs.h (procfs_cleanup_contents_with_free,
procfs_cleanup_contents_with_vm_deallocate, procfs_get_contents,
struct procfs_ops): Change CONTENTS from a void pointer to a char one.
* dircat.c, netfs.c, process.c, procfs.c,
procfs_dir.c, proclist.c, rootdir.c: Update.
Diffstat (limited to 'procfs.c')
-rw-r--r-- | procfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -12,7 +12,7 @@ struct netnode void *hook; /* (cached) contents of the node */ - void *contents; + char *contents; size_t contents_len; /* parent directory, if applicable */ @@ -20,13 +20,13 @@ struct netnode }; void -procfs_cleanup_contents_with_free (void *hook, void *cont, size_t len) +procfs_cleanup_contents_with_free (void *hook, char *cont, size_t len) { free (cont); } void -procfs_cleanup_contents_with_vm_deallocate (void *hook, void *cont, size_t len) +procfs_cleanup_contents_with_vm_deallocate (void *hook, char *cont, size_t len) { vm_deallocate (mach_task_self (), (vm_address_t) cont, (vm_size_t) len); } @@ -109,7 +109,7 @@ procfs_make_ino (struct node *np, const char *filename) return (unsigned long) jrand48 (x); } -error_t procfs_get_contents (struct node *np, void **data, size_t *data_len) +error_t procfs_get_contents (struct node *np, char **data, size_t *data_len) { if (np->nn->ops->enable_refresh_hack_and_break_readdir && np->nn->contents) { @@ -121,7 +121,7 @@ error_t procfs_get_contents (struct node *np, void **data, size_t *data_len) if (! np->nn->contents && np->nn->ops->get_contents) { - void *contents; + char *contents; size_t contents_len; error_t err; |