In Linux, the file_ops, can just be initialized with only the callbacks you
want to override.
If we want to always have the devtab struct to hold valid callbacks, we
could have a DEVTAB_INIT macro, which initializes to the defaults, followed
by device specific initializations.
As this is allowed in GCC:

struc a {
  .close = dummy_close,
  ...
  .close = my_device_close
};


On Mon, Dec 21, 2015 at 9:41 AM, Barret Rhoden <[email protected]> wrote:

> On 2015-12-15 at 14:45 "'Davide Libenzi' via Akaros"
> <[email protected]> wrote:
> > It makes life easier if certain simple devices (ex, things like
> > #version), would not have to declare empty stubs for functions it
> > does not need to have.
>
> Under the old system (right before this patch), #version didn't need
> to have stubs (like ver_init and ver_shutdown).  It can just use
> devinit, devshutdown, and devreset.  But I prefer allowing them to be
> 0, since it was a source of confusion.
>
> Merged to master at 345158006a10..f945c3bf7870 (from, to]
>
> You can see the entire diff with 'git diff' or at
> https://github.com/brho/akaros/compare/345158006a10...f945c3bf7870
>
> Barret
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to