|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 17/18] mini-os: use function vectors instead of switch for file operations
Samuel Thibault, le mar. 11 janv. 2022 21:05:47 +0100, a ecrit:
> Juergen Gross, le mar. 11 janv. 2022 15:58:16 +0100, a ecrit:
> > @@ -370,8 +413,45 @@ int write(int fd, const void *buf, size_t nbytes)
> > return -1;
> > }
> >
> > +off_t lseek_default(int fd, off_t offset, int whence)
> > +{
> > + switch ( whence )
> > + {
>
> Is there a reason for making this one a separate function, unlike others
> for which you kept the code in the main function?
Ah, I guess that it's because in the end, it's the only function that
has a default implementation left? And thus the rule is that unless the
method is set, the default implementation is ENOSYS? I agree with that,
then.
Samuel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |