dir.c (248d86e87d12da19eee602075f05a49a5215288b) | dir.c (1d3d752b471d2a3a1d5e4fe177e5e7d52abb4e4c) |
---|---|
1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 222 unchanged lines hidden (view full) --- 231 struct fuse_file *ff; 232 struct file *file; 233 int flags = nd->intent.open.flags - 1; 234 235 err = -ENOSYS; 236 if (fc->no_create) 237 goto out; 238 | 1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 222 unchanged lines hidden (view full) --- 231 struct fuse_file *ff; 232 struct file *file; 233 int flags = nd->intent.open.flags - 1; 234 235 err = -ENOSYS; 236 if (fc->no_create) 237 goto out; 238 |
239 err = -ENAMETOOLONG; 240 if (entry->d_name.len > FUSE_NAME_MAX) 241 goto out; 242 | |
243 err = -EINTR; 244 req = fuse_get_request(fc); 245 if (!req) 246 goto out; 247 248 ff = fuse_file_alloc(); 249 if (!ff) 250 goto out_put_request; --- 157 unchanged lines hidden (view full) --- 408 return create_new_entry(fc, req, dir, entry, S_IFDIR); 409} 410 411static int fuse_symlink(struct inode *dir, struct dentry *entry, 412 const char *link) 413{ 414 struct fuse_conn *fc = get_fuse_conn(dir); 415 unsigned len = strlen(link) + 1; | 239 err = -EINTR; 240 req = fuse_get_request(fc); 241 if (!req) 242 goto out; 243 244 ff = fuse_file_alloc(); 245 if (!ff) 246 goto out_put_request; --- 157 unchanged lines hidden (view full) --- 404 return create_new_entry(fc, req, dir, entry, S_IFDIR); 405} 406 407static int fuse_symlink(struct inode *dir, struct dentry *entry, 408 const char *link) 409{ 410 struct fuse_conn *fc = get_fuse_conn(dir); 411 unsigned len = strlen(link) + 1; |
416 struct fuse_req *req; 417 418 if (len > FUSE_SYMLINK_MAX) 419 return -ENAMETOOLONG; 420 421 req = fuse_get_request(fc); | 412 struct fuse_req *req = fuse_get_request(fc); |
422 if (!req) 423 return -EINTR; 424 425 req->in.h.opcode = FUSE_SYMLINK; 426 req->in.numargs = 2; 427 req->in.args[0].size = entry->d_name.len + 1; 428 req->in.args[0].value = entry->d_name.name; 429 req->in.args[1].size = len; --- 553 unchanged lines hidden (view full) --- 983 const void *value, size_t size, int flags) 984{ 985 struct inode *inode = entry->d_inode; 986 struct fuse_conn *fc = get_fuse_conn(inode); 987 struct fuse_req *req; 988 struct fuse_setxattr_in inarg; 989 int err; 990 | 413 if (!req) 414 return -EINTR; 415 416 req->in.h.opcode = FUSE_SYMLINK; 417 req->in.numargs = 2; 418 req->in.args[0].size = entry->d_name.len + 1; 419 req->in.args[0].value = entry->d_name.name; 420 req->in.args[1].size = len; --- 553 unchanged lines hidden (view full) --- 974 const void *value, size_t size, int flags) 975{ 976 struct inode *inode = entry->d_inode; 977 struct fuse_conn *fc = get_fuse_conn(inode); 978 struct fuse_req *req; 979 struct fuse_setxattr_in inarg; 980 int err; 981 |
991 if (size > FUSE_XATTR_SIZE_MAX) 992 return -E2BIG; 993 | |
994 if (fc->no_setxattr) 995 return -EOPNOTSUPP; 996 997 req = fuse_get_request(fc); 998 if (!req) 999 return -EINTR; 1000 1001 memset(&inarg, 0, sizeof(inarg)); --- 216 unchanged lines hidden --- | 982 if (fc->no_setxattr) 983 return -EOPNOTSUPP; 984 985 req = fuse_get_request(fc); 986 if (!req) 987 return -EINTR; 988 989 memset(&inarg, 0, sizeof(inarg)); --- 216 unchanged lines hidden --- |