On 2016-10-14 at 20:27 ron minnich wrote: > > I think we might want/need to run omode through openmode(). The other > > drivers do something like: > > > > I'd like to not mess with this but just now. But later, yes. This device is > pretty subtle so I don't like to make such changes right off.
Sounds fine. The openmode() change was something I noticed in a bunch of devices. I think some had it and some didn't, and I think at some point it became the right thing for all devices, at least in my head. these call it directly: ---------- kern/src/net/devip.c kern/drivers/dev/alarm.c kern/drivers/dev/kprof.c kern/drivers/dev/mnt.c kern/drivers/dev/pipe.c kern/drivers/dev/proc.c kern/drivers/dev/regress.c kern/drivers/dev/root.c kern/drivers/dev/srv.c kern/drivers/dev/vars.c kern/drivers/dev/version.c these call it via devopen(): -------------------- kern/arch/x86/devarch.c kern/drivers/dev/acpi.c kern/drivers/dev/cons.c kern/drivers/dev/eventfd.c kern/drivers/dev/pci.c kern/drivers/dev/proc.c kern/drivers/dev/root.c kern/drivers/dev/sd.c kern/drivers/dev/ether.c (netif.c) Fun tidbit, these C files aren't actual devices (which is fine): ---------------------- kern/drivers/dev/coreboot.c kern/drivers/dev/sdiahci.c kern/drivers/dev/sdscsi.c There aren't any devices that don't call it, though my searching might have missed things. For instance, #proc is a total mess and does all sorts of things with omode checks. Anyway, we can leave #capability as is. Basically the omode must be O_READ there, based on the if check, so it's OK. 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 akaros+unsubscr...@googlegroups.com. To post to this group, send email to akaros@googlegroups.com. For more options, visit https://groups.google.com/d/optout.