Kernel: Handle TIOC{G,S}WINSZ on pipes
GCC likes to do this a lot and debug logging is excessive
This commit is contained in:
@@ -44,6 +44,8 @@ namespace Kernel
|
||||
virtual bool has_error_impl() const override { return m_reading_count == 0; }
|
||||
virtual bool has_hungup_impl() const override { return m_writing_count == 0; }
|
||||
|
||||
virtual BAN::ErrorOr<long> ioctl_impl(int, void*) override;
|
||||
|
||||
private:
|
||||
Pipe(const Credentials&);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
namespace Kernel
|
||||
{
|
||||
@@ -123,4 +124,16 @@ namespace Kernel
|
||||
return to_copy;
|
||||
}
|
||||
|
||||
|
||||
BAN::ErrorOr<long> Pipe::ioctl_impl(int cmd, void* arg)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case TIOCGWINSZ:
|
||||
case TIOCSWINSZ:
|
||||
return BAN::Error::from_errno(EINVAL);
|
||||
}
|
||||
return Inode::ioctl_impl(cmd, arg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user