diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-17 00:32:29 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-17 00:43:09 +0100 |
commit | f5fb7c713ea443469406a691e60a6f4567a4cb75 (patch) | |
tree | b16d979915b5ad7e32ffe77ca5f5006dc639a16e /pci-arbiter | |
parent | dd3048b2e483f66571cfa1b2ccebb2091b9ad990 (diff) | |
download | hurd-f5fb7c713ea443469406a691e60a6f4567a4cb75.tar.gz hurd-f5fb7c713ea443469406a691e60a6f4567a4cb75.tar.bz2 hurd-f5fb7c713ea443469406a691e60a6f4567a4cb75.zip |
Fix const warnings
Now that the RPCs have const, this forces us cleaning our const-meant
functions.
Diffstat (limited to 'pci-arbiter')
-rw-r--r-- | pci-arbiter/netfs_impl.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pci-arbiter/netfs_impl.c b/pci-arbiter/netfs_impl.c index db35d268..b2630f01 100644 --- a/pci-arbiter/netfs_impl.c +++ b/pci-arbiter/netfs_impl.c @@ -120,7 +120,7 @@ get_dirents (struct pcifs_dirent *dir, } static struct pcifs_dirent * -lookup (struct node *np, char *name) +lookup (struct node *np, const char *name) { int i; struct pcifs_dirent *ret = 0, *e; @@ -173,7 +173,7 @@ destroy_node (struct node *node) locked on success; no matter what, unlock DIR before returning. */ error_t netfs_attempt_create_file (struct iouser * user, struct node * dir, - char *name, mode_t mode, struct node ** node) + const char *name, mode_t mode, struct node ** node) { *node = 0; pthread_mutex_unlock (&dir->lock); @@ -255,7 +255,7 @@ netfs_get_dirents (struct iouser * cred, struct node * dir, what.) */ error_t netfs_attempt_lookup (struct iouser * user, struct node * dir, - char *name, struct node ** node) + const char *name, struct node ** node) { error_t err = 0; struct pcifs_dirent *entry; @@ -351,7 +351,7 @@ netfs_attempt_lookup (struct iouser * user, struct node * dir, /* Delete NAME in DIR for USER. */ error_t -netfs_attempt_unlink (struct iouser * user, struct node * dir, char *name) +netfs_attempt_unlink (struct iouser * user, struct node * dir, const char *name) { return EOPNOTSUPP; } @@ -359,8 +359,8 @@ netfs_attempt_unlink (struct iouser * user, struct node * dir, char *name) /* Note that in this one call, neither of the specific nodes are locked. */ error_t netfs_attempt_rename (struct iouser * user, struct node * fromdir, - char *fromname, struct node * todir, - char *toname, int excl) + const char *fromname, struct node * todir, + const char *toname, int excl) { return EOPNOTSUPP; } @@ -369,14 +369,14 @@ netfs_attempt_rename (struct iouser * user, struct node * fromdir, MODE. */ error_t netfs_attempt_mkdir (struct iouser * user, struct node * dir, - char *name, mode_t mode) + const char *name, mode_t mode) { return EOPNOTSUPP; } /* Attempt to remove directory named NAME in DIR for USER. */ error_t -netfs_attempt_rmdir (struct iouser * user, struct node * dir, char *name) +netfs_attempt_rmdir (struct iouser * user, struct node * dir, const char *name) { return EOPNOTSUPP; } @@ -412,7 +412,7 @@ netfs_attempt_chmod (struct iouser * cred, struct node * node, mode_t mode) /* Attempt to turn NODE (user CRED) into a symlink with target NAME. */ error_t -netfs_attempt_mksymlink (struct iouser * cred, struct node * node, char *name) +netfs_attempt_mksymlink (struct iouser * cred, struct node * node, const char *name) { return EOPNOTSUPP; } @@ -468,7 +468,7 @@ netfs_attempt_syncfs (struct iouser * cred, int wait) return EEXIST if NAME is already found in DIR. */ error_t netfs_attempt_link (struct iouser * user, struct node * dir, - struct node * file, char *name, int excl) + struct node * file, const char *name, int excl) { return EOPNOTSUPP; } @@ -533,14 +533,14 @@ netfs_attempt_read (struct iouser * cred, struct node * node, return. */ error_t netfs_attempt_write (struct iouser * cred, struct node * node, - off_t offset, size_t * len, void *data) + off_t offset, size_t * len, const void *data) { error_t err; if (!strncmp (node->nn->ln->name, FILE_CONFIG_NAME, NAME_SIZE)) { err = - io_config_file (node->nn->ln->device, offset, len, data, + io_config_file (node->nn->ln->device, offset, len, (void*) data, (pci_io_op_t) pci_device_cfg_write); if (!err) { @@ -551,7 +551,7 @@ netfs_attempt_write (struct iouser * cred, struct node * node, else if (!strncmp (node->nn->ln->name, FILE_REGION_NAME, strlen (FILE_REGION_NAME))) { - err = io_region_file (node->nn->ln, offset, len, data, 0); + err = io_region_file (node->nn->ln, offset, len, (void*) data, 0); if (!err) /* Update atime */ UPDATE_TIMES (node->nn->ln, TOUCH_MTIME | TOUCH_CTIME); |