Thanks, resend. -----邮件原件----- 发件人: HelenOS-devel [mailto:[email protected]] 代表 Jakub Jermá? 发送时间: 2019年2月27日 14:30 收件人: [email protected] 主题: Re: [HelenOS-devel] vfs: do sanity check while resizing
Hello Wang Jianjian, On 2/27/19 4:59 AM, wangjianjian (C) wrote: > diff --git a/uspace/srv/vfs/vfs_ops.c b/uspace/srv/vfs/vfs_ops.c index > 2570a27..7aada91 100644 > --- a/uspace/srv/vfs/vfs_ops.c > +++ b/uspace/srv/vfs/vfs_ops.c > @@ -617,6 +617,10 @@ errno_t vfs_op_resize(int fd, int64_t size) > if (!file) > return EBADF; > > + if (!file->open_write || > + file->node->type != VFS_NODE_FILE) This line break is unnecessary. Also note that for long lines the following line should be indented by four spaces only. > + return -EINVAL; In HelenOS this should be just EINVAL, not -EINVAL. Best, Jakub _______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
0001-vfs-do-sanity-check-while-resizing.patch
Description: 0001-vfs-do-sanity-check-while-resizing.patch
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
