cmd/sharefs: remove readlink
All checks were successful
Test / Create distribution (push) Successful in 44s
Test / Sandbox (push) Successful in 2m31s
Test / ShareFS (push) Successful in 3m23s
Test / Hakurei (push) Successful in 3m27s
Test / Hpkg (push) Successful in 4m20s
Test / Sandbox (race detector) (push) Successful in 4m40s
Test / Hakurei (race detector) (push) Successful in 5m33s
Test / Flake checks (push) Successful in 1m44s
All checks were successful
Test / Create distribution (push) Successful in 44s
Test / Sandbox (push) Successful in 2m31s
Test / ShareFS (push) Successful in 3m23s
Test / Hakurei (push) Successful in 3m27s
Test / Hpkg (push) Successful in 4m20s
Test / Sandbox (race detector) (push) Successful in 4m40s
Test / Hakurei (race detector) (push) Successful in 5m33s
Test / Flake checks (push) Successful in 1m44s
This filesystem does not support symbolic links, so readlink is not useful, and unreachable in this case because of the check in getattr. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -82,19 +82,6 @@ int sharefs_getattr(const char *pathname, struct stat *statbuf, struct fuse_file
|
||||
return impl_getattr(ctx, statbuf);
|
||||
}
|
||||
|
||||
int sharefs_readlink(const char *pathname, char *buf, size_t bufsiz) {
|
||||
int res;
|
||||
struct fuse_context *ctx;
|
||||
struct sharefs_private *priv;
|
||||
GET_CONTEXT_PRIV(ctx, priv);
|
||||
MUST_TRANSLATE_PATHNAME(pathname);
|
||||
|
||||
if ((res = readlinkat(priv->dirfd, pathname, buf, bufsiz - 1)) == -1)
|
||||
return -errno;
|
||||
buf[res] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sharefs_readdir(const char *pathname, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags) {
|
||||
int fd;
|
||||
DIR *dp;
|
||||
|
||||
@@ -12,7 +12,6 @@ struct sharefs_private {
|
||||
};
|
||||
|
||||
int sharefs_getattr(const char *pathname, struct stat *statbuf, struct fuse_file_info *fi);
|
||||
int sharefs_readlink(const char *pathname, char *buf, size_t bufsiz);
|
||||
int sharefs_readdir(const char *pathname, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags flags);
|
||||
int sharefs_mkdir(const char *pathname, mode_t mode);
|
||||
int sharefs_unlink(const char *pathname);
|
||||
|
||||
@@ -240,7 +240,6 @@ func _main(argc int, argv **C.char) int {
|
||||
|
||||
// implemented in fuse-helper.c
|
||||
getattr: closure(C.sharefs_getattr),
|
||||
readlink: closure(C.sharefs_readlink),
|
||||
readdir: closure(C.sharefs_readdir),
|
||||
mkdir: closure(C.sharefs_mkdir),
|
||||
unlink: closure(C.sharefs_unlink),
|
||||
|
||||
Reference in New Issue
Block a user