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 /libnetfs/netfs.h | |
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 'libnetfs/netfs.h')
-rw-r--r-- | libnetfs/netfs.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libnetfs/netfs.h b/libnetfs/netfs.h index b877f0c6..3bab63cd 100644 --- a/libnetfs/netfs.h +++ b/libnetfs/netfs.h @@ -142,7 +142,7 @@ error_t netfs_attempt_chmod (struct iouser *cred, struct node *np, /* The user must define this function. Attempt to turn locked node NP (user CRED) into a symlink with target NAME. */ error_t netfs_attempt_mksymlink (struct iouser *cred, struct node *np, - char *name); + const char *name); /* The user must define this function. Attempt to turn NODE (user CRED) into a device. TYPE is either S_IFBLK or S_IFCHR. NP is @@ -154,7 +154,7 @@ error_t netfs_attempt_mkdev (struct iouser *cred, struct node *np, translator record for FILE to ARGZ (of length ARGZLEN) for user CRED. NP is locked. */ error_t netfs_set_translator (struct iouser *cred, struct node *np, - char *argz, size_t argzlen); + const char *argz, size_t argzlen); /* The user may define this function (but should define it together with netfs_set_translator). For locked node NODE with S_IPTRANS @@ -205,30 +205,30 @@ error_t netfs_attempt_syncfs (struct iouser *cred, int wait); (*NP, if found, should be locked and a reference to it generated. This call should unlock DIR no matter what.) */ error_t netfs_attempt_lookup (struct iouser *user, struct node *dir, - char *name, struct node **np); + const char *name, struct node **np); /* The user must define this function. Delete NAME in DIR (which is locked) for USER. */ error_t netfs_attempt_unlink (struct iouser *user, struct node *dir, - char *name); + const char *name); /* The user must define this function. Attempt to rename the directory FROMDIR to TODIR. Note that 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); /* The user must define this function. Attempt to create a new directory named NAME in DIR (which is locked) for USER with mode MODE. */ error_t netfs_attempt_mkdir (struct iouser *user, struct node *dir, - char *name, mode_t mode); + const char *name, mode_t mode); /* The user must define this function. Attempt to remove directory named NAME in DIR (which is locked) for USER. */ error_t netfs_attempt_rmdir (struct iouser *user, - struct node *dir, char *name); + struct node *dir, const char *name); /* The user must define this function. Create a link in DIR with name @@ -236,7 +236,7 @@ error_t netfs_attempt_rmdir (struct iouser *user, locked. If EXCL is set, do not delete the target. 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); /* The user must define this function. Attempt to create an anonymous file related to DIR (which is locked) for USER with MODE. Set *NP @@ -249,7 +249,7 @@ error_t netfs_attempt_mkfile (struct iouser *user, struct node *dir, new node upon return. On any error, clear *NP. *NP should be 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 **np); + const char *name, mode_t mode, struct node **np); /* The user must define this function. Read the contents of locked node NP (a symlink), for USER, into BUF. */ @@ -275,7 +275,7 @@ error_t netfs_attempt_read (struct iouser *cred, struct node *np, from DATA. Set *LEN to the amount successfully written upon return. */ error_t netfs_attempt_write (struct iouser *cred, struct node *np, - loff_t offset, size_t *len, void *data); + loff_t offset, size_t *len, const void *data); /* The user must define this function. Return the valid access types (bitwise OR of O_READ, O_WRITE, and O_EXEC) in *TYPES for @@ -335,7 +335,7 @@ error_t netfs_get_source (char *source, size_t source_len); /* Parse and execute the runtime options in ARGZ & ARGZ_LEN. EINVAL is returned if some option is unrecognized. The default definition of this routine will parse them using NETFS_RUNTIME_ARGP. */ -error_t netfs_set_options (char *argz, size_t argz_len); +error_t netfs_set_options (const char *argz, size_t argz_len); /* Append to the malloced string *ARGZ of length *ARGZ_LEN a NUL-separated list of the arguments to this translator. The default definition of this |