[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 39/43: Remove unused parameter from the 'get_source' machinery.
From: |
Samuel Thibault |
Subject: |
[hurd] 39/43: Remove unused parameter from the 'get_source' machinery. |
Date: |
Mon, 11 Sep 2017 07:10:12 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 973089f3832df9887259e1927f7ead800d9dd897
Author: Justus Winter <address@hidden>
Date: Tue Aug 29 12:27:58 2017 +0200
Remove unused parameter from the 'get_source' machinery.
* libdiskfs/diskfs.h (diskfs_get_source): Remove first parameter.
* libdiskfs/file-get-source.c (diskfs_S_file_get_source): Adapt
callsite.
* libdiskfs/get-source.c (diskfs_get_source): Adapt default
implementation.
* libnetfs/netfs.h (netfs_get_source): Remove first parameter.
* libnetfs/file-get-source.c (netfs_S_file_get_source): Adapt
callsite.
* libnetfs/get-source.c (netfs_get_source): Adapt default
implementation.
* libtrivfs/trivfs.h (trivfs_get_source): Remove first parameter.
* libtrivfs/file-get-source.c (trivfs_S_file_get_source): Adapt
callsite.
* libtrivfs/get-source.c (trivfs_get_source): Adapt default
implementation.
* nfs/main.c (netfs_get_source): Adapt implementation.
* procfs/main.c (netfs_get_source): Likewise.
* trans/firmlink.c (trivfs_get_source): Likewise.
---
libdiskfs/diskfs.h | 10 +++++-----
libdiskfs/file-get-source.c | 2 +-
libdiskfs/get-source.c | 2 +-
libnetfs/file-get-source.c | 2 +-
libnetfs/get-source.c | 2 +-
libnetfs/netfs.h | 9 ++++-----
libtrivfs/file-get-source.c | 2 +-
libtrivfs/get-source.c | 2 +-
libtrivfs/trivfs.h | 11 +++++------
nfs/main.c | 11 ++++-------
procfs/main.c | 10 ++++------
trans/firmlink.c | 3 +--
12 files changed, 29 insertions(+), 37 deletions(-)
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 0e14852..40af37a 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -586,11 +586,11 @@ error_t (*diskfs_create_symlink_hook)(struct node *np,
const char *target);
error_t (*diskfs_read_symlink_hook)(struct node *np, char *target);
/* The user may define this function. The function must set source to
- the source of CRED. The function may return an EOPNOTSUPP to
- indicate that the concept of a source device is not applicable. The
- default function always returns EOPNOTSUPP. */
-error_t diskfs_get_source (struct protid *cred,
- char *source, size_t source_len);
+ the source of the translator. The function may return an EOPNOTSUPP
+ to indicate that the concept of a source device is not
+ applicable. The default function always returns diskfs_disk_name,
+ or EOPNOTSUPP if it is NULL. */
+error_t diskfs_get_source (char *source, size_t source_len);
/* Libdiskfs contains a node cache.
diff --git a/libdiskfs/file-get-source.c b/libdiskfs/file-get-source.c
index b5c3184..d983a82 100644
--- a/libdiskfs/file-get-source.c
+++ b/libdiskfs/file-get-source.c
@@ -33,5 +33,5 @@ diskfs_S_file_get_source (struct protid *cred,
|| cred->pi.class != diskfs_protid_class)
return EOPNOTSUPP;
- return diskfs_get_source (cred, source, 1024 /* XXX */);
+ return diskfs_get_source (source, 1024 /* XXX */);
}
diff --git a/libdiskfs/get-source.c b/libdiskfs/get-source.c
index 2ef8ebc..9962ee9 100644
--- a/libdiskfs/get-source.c
+++ b/libdiskfs/get-source.c
@@ -22,7 +22,7 @@
#include "priv.h"
error_t __attribute__ ((weak))
-diskfs_get_source (struct protid *cred, char *source, size_t source_len)
+diskfs_get_source (char *source, size_t source_len)
{
if (diskfs_disk_name == NULL)
return EOPNOTSUPP;
diff --git a/libnetfs/file-get-source.c b/libnetfs/file-get-source.c
index 7fa1b4f..acd3230 100644
--- a/libnetfs/file-get-source.c
+++ b/libnetfs/file-get-source.c
@@ -31,5 +31,5 @@ netfs_S_file_get_source (struct protid *cred,
if (! cred)
return EOPNOTSUPP;
- return netfs_get_source (cred, source, 1024 /* XXX */);
+ return netfs_get_source (source, 1024 /* XXX */);
}
diff --git a/libnetfs/get-source.c b/libnetfs/get-source.c
index 5a234bc..cf23744 100644
--- a/libnetfs/get-source.c
+++ b/libnetfs/get-source.c
@@ -22,7 +22,7 @@
#include "priv.h"
error_t __attribute__ ((weak))
-netfs_get_source (struct protid *cred, char *source, size_t source_len)
+netfs_get_source (char *source, size_t source_len)
{
return EOPNOTSUPP;
}
diff --git a/libnetfs/netfs.h b/libnetfs/netfs.h
index afd4a06..5b5ca93 100644
--- a/libnetfs/netfs.h
+++ b/libnetfs/netfs.h
@@ -320,11 +320,10 @@ error_t netfs_file_get_storage_info (struct iouser *cred,
mach_msg_type_number_t *data_len);
/* The user may define this function. The function must set source to
- the source of CRED. The function may return an EOPNOTSUPP to
- indicate that the concept of a source device is not applicable. The
- default function always returns EOPNOTSUPP. */
-error_t netfs_get_source (struct protid *cred,
- char *source, size_t source_len);
+ the source of the translator. The function may return an EOPNOTSUPP
+ to indicate that the concept of a source device is not
+ applicable. The default function always returns EOPNOTSUPP. */
+error_t netfs_get_source (char *source, size_t source_len);
/* Option parsing */
diff --git a/libtrivfs/file-get-source.c b/libtrivfs/file-get-source.c
index f6637d8..c2420fb 100644
--- a/libtrivfs/file-get-source.c
+++ b/libtrivfs/file-get-source.c
@@ -30,5 +30,5 @@ trivfs_S_file_get_source (struct trivfs_protid *cred,
mach_msg_type_name_t replyPoly,
char *source)
{
- return cred? trivfs_get_source (cred, source, 1024 /* XXX */): EOPNOTSUPP;
+ return cred ? trivfs_get_source (source, 1024 /* XXX */) : EOPNOTSUPP;
}
diff --git a/libtrivfs/get-source.c b/libtrivfs/get-source.c
index 1b3ce11..1f77200 100644
--- a/libtrivfs/get-source.c
+++ b/libtrivfs/get-source.c
@@ -22,7 +22,7 @@
#include "priv.h"
error_t __attribute__ ((weak))
-trivfs_get_source (struct trivfs_protid *cred, char *source, size_t source_len)
+trivfs_get_source (char *source, size_t source_len)
{
return EOPNOTSUPP;
}
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h
index 49cc765..ddeb29a 100644
--- a/libtrivfs/trivfs.h
+++ b/libtrivfs/trivfs.h
@@ -215,12 +215,11 @@ error_t trivfs_set_options (struct trivfs_control *fsys,
error_t trivfs_append_args (struct trivfs_control *fsys,
char **argz, size_t *argz_len);
-/* The user may define this function. The function must set source to
- the source device of CRED. The function may return an EOPNOTSUPP to
- indicate that the concept of a source device is not applicable. The
- default function always returns EOPNOTSUPP. */
-error_t trivfs_get_source (struct trivfs_protid *cred,
- char *source, size_t source_len);
+/* The user may define this function. The function must set SOURCE to
+ the source of the translator. The function may return an EOPNOTSUPP
+ to indicate that the concept of a source device is not
+ applicable. The default function always returns EOPNOTSUPP. */
+error_t trivfs_get_source (char *source, size_t source_len);
/* Add the port class *CLASS to the list of control port classes recognized
by trivfs; if *CLASS is 0, an attempt is made to allocate a new port
diff --git a/nfs/main.c b/nfs/main.c
index cd1c29a..c98eb56 100644
--- a/nfs/main.c
+++ b/nfs/main.c
@@ -270,15 +270,12 @@ netfs_append_args (char **argz, size_t *argz_len)
}
/* The user may define this function. The function must set source to
- the source of CRED. The function may return an EOPNOTSUPP to
- indicate that the concept of a source device is not applicable. The
- default function always returns EOPNOTSUPP. */
+ the source of the translator. The function may return an EOPNOTSUPP
+ to indicate that the concept of a source device is not
+ applicable. The default function always returns EOPNOTSUPP. */
error_t
-netfs_get_source (struct protid *cred, char *source, size_t source_len)
+netfs_get_source (char *source, size_t source_len)
{
- if (! cred)
- return EOPNOTSUPP;
-
snprintf (source, source_len, "%s:%s", host, remote_fs);
return 0;
}
diff --git a/procfs/main.c b/procfs/main.c
index 0c87175..e9e2912 100644
--- a/procfs/main.c
+++ b/procfs/main.c
@@ -254,13 +254,11 @@ netfs_append_args (char **argz, size_t *argz_len)
}
/* The user may define this function. The function must set source to
- the source of CRED. The function may return an EOPNOTSUPP to
- indicate that the concept of a source device is not applicable. The
- default function always returns EOPNOTSUPP. */
-error_t netfs_get_source (struct protid *cred, char *source, size_t source_len)
+ the source of the translator. The function may return an EOPNOTSUPP
+ to indicate that the concept of a source device is not
+ applicable. The default function always returns EOPNOTSUPP. */
+error_t netfs_get_source (char *source, size_t source_len)
{
- if (! cred)
- return EOPNOTSUPP;
snprintf (source, source_len, "proc");
return 0;
}
diff --git a/trans/firmlink.c b/trans/firmlink.c
index 19382f1..ca094ec 100644
--- a/trans/firmlink.c
+++ b/trans/firmlink.c
@@ -287,8 +287,7 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred,
return trivfs_S_io_select (cred, reply, reply_type, type);
}
-error_t trivfs_get_source (struct trivfs_protid *cred,
- char *source, size_t source_len)
+error_t trivfs_get_source (char *source, size_t source_len)
{
strncpy (source, target, source_len - 1);
source[source_len -1 ] = '\0';
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 34/43: libdiskfs: Simplify type checks., (continued)
- [hurd] 34/43: libdiskfs: Simplify type checks., Samuel Thibault, 2017/09/11
- [hurd] 16/43: Simplify deallocations., Samuel Thibault, 2017/09/11
- [hurd] 29/43: eth-multiplexer: Respect interfaces up flags., Samuel Thibault, 2017/09/11
- [hurd] 36/43: startup: Don't spin on host_reboot failures., Samuel Thibault, 2017/09/11
- [hurd] 30/43: Drop the register qualifier., Samuel Thibault, 2017/09/11
- [hurd] 02/43: trans: New random translator., Samuel Thibault, 2017/09/11
- [hurd] 43/43: storeio: Avoid calling mmap with zero size, Samuel Thibault, 2017/09/11
- [hurd] 03/43: trans: Conditionally build the random translator., Samuel Thibault, 2017/09/11
- [hurd] 17/43: Replace bcopy with memcpy or memmove as appropriate., Samuel Thibault, 2017/09/11
- [hurd] 42/43: Fix build with glibc-2.26, Samuel Thibault, 2017/09/11
- [hurd] 39/43: Remove unused parameter from the 'get_source' machinery.,
Samuel Thibault <=
- [hurd] 37/43: trans/symlink: Use default server stubs., Samuel Thibault, 2017/09/11
- [hurd] 40/43: pfinet: select UDP/TCP ports randomly, Samuel Thibault, 2017/09/11
- [hurd] 15/43: Use our own variant of 'assert' and 'assert_perror'., Samuel Thibault, 2017/09/11