Skip to content

Commit

Permalink
fixup! [LibOS,PAL] Refactor LibOS's /dev/tty and PAL's correspondin…
Browse files Browse the repository at this point in the history
…g `dev:tty`

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
  • Loading branch information
Dmitrii Kuvaiskii committed Sep 27, 2023
1 parent 7179d10 commit 5b6c9e9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions libos/src/fs/libos_namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ int dentry_open(struct libos_handle* hdl, struct libos_dentry* dent, int flags)

/* truncate regular writable file if O_TRUNC is given */
if ((flags & O_TRUNC) && ((flags & O_RDWR) | (flags & O_WRONLY))
&& (dent->inode->type != S_IFCHR)
&& (dent->inode->type != S_IFDIR)
&& (dent->inode->type != S_IFLNK)) {
&& (dent->inode->type == S_IFREG)) {
if (!(fs->fs_ops && fs->fs_ops->truncate))
return -EINVAL;

Expand Down

0 comments on commit 5b6c9e9

Please sign in to comment.