mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +00:00
Import very modest Userland.
This commit is contained in:
parent
4cbf079a17
commit
63764b3a65
23 changed files with 81 additions and 27 deletions
|
@ -13,7 +13,7 @@ FileHandle::~FileHandle()
|
|||
{
|
||||
}
|
||||
|
||||
#ifndef SERENITY_KERNEL
|
||||
#ifndef SERENITY
|
||||
bool additionWouldOverflow(Unix::off_t a, Unix::off_t b)
|
||||
{
|
||||
ASSERT(a > 0);
|
||||
|
@ -69,7 +69,7 @@ Unix::off_t FileHandle::seek(Unix::off_t offset, int whence)
|
|||
break;
|
||||
case SEEK_CUR:
|
||||
newOffset = m_currentOffset + offset;
|
||||
#ifndef SERENITY_KERNEL
|
||||
#ifndef SERENITY
|
||||
if (additionWouldOverflow(m_currentOffset, offset))
|
||||
return -EOVERFLOW;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue