diff --git a/sshfs.c b/sshfs.c index 5513266..c4ae263 100644 --- a/sshfs.c +++ b/sshfs.c @@ -3409,6 +3409,40 @@ static int sshfs_getattr(const char *path, struct stat *stbuf, return err; } +static int sshfs_listxattr(const char *path, char *value, size_t size) { + (void)path; + + if (size == 0) { + return 11; + } + + if (size < 11) { + return -ERANGE; + } + + strcpy(value, "lustre.lov"); + return 11; +} + +static int sshfs_getxattr(const char *path, const char *name, char *value, size_t size) { + (void)path; + + if (strcmp(name, "lustre.lov") != 0) { + return -ENODATA; + } + + if (size == 0) { + return 6; + } + + if (size < 6) { + return -ERANGE; + } + + strcpy(value, "dummy"); + return 6; +} + static int sshfs_truncate_zero(const char *path) { int err; @@ -3557,6 +3591,8 @@ static int processing_init(void) static struct fuse_operations sshfs_oper = { .init = sshfs_init, .getattr = sshfs_getattr, + .listxattr = sshfs_listxattr, + .getxattr = sshfs_getxattr, .access = sshfs_access, .opendir = sshfs_opendir, .readdir = sshfs_readdir,