On Sun 31 Aug 2008 at 12:16AM, Danek Duvall wrote:
> http://cr.opensolaris.org/~dduvall/pkg-devlinks/
>
> This fixes
>
> 2349 import of 86 fails on kernel/drv/sd.conf
> 2839 driver actions should support devlinks
>
> This'll allow us to support packages that deliver their own devlink.tab
> entries, such as VirtualBox and the Sun Ray Server Software.
>
> I've tested an import (with changes applied to build 96), and an install of
> SUNWcsd, SUNWcs, SUNWscm, and SUNWrdc to verify everything works there.
> Also an install of build 95 (where devlink.tab is delivered pre-populated)
> and upgrading to my build 96, with SUNWscm and SUNWrdc installed before
> upgrade, and with them installed after upgrade.
>
> There are some cases that don't work properly because there's no definitive
> way to associate a devlink.tab entry with a driver action without it being
> part of the action. The other driver attributes can be uniquely
> identified, and so we can pretend they were part of the previously
> installed driver action, but not this one. I don't think the consequences
> are severe, luckily.
When you add the devlink entry, I notice that there is checking for
dups, and no dups are added. When the package is removed, that will
presumably nuke the devlinks and when the second package is removed,
we'll emit the warning you added. I was wondering if it might make
sense to actually stick the dup entries into the file and in the remove
logic, take care to only remove one instance of the entry. That would
effectively do the reference counting you'd want, and presumably
wouldn't hurt. You'd have to see if the kernel tolerates it.
When writing to devlink.tab, it'd be nice to write a new devlink.tab
file and then move it into place. If you run into ENOSPC here, the
system will be fubar.
What happens to this code in the unlikely case that devlink.tab does
not exist?
Saying that things "were found missing" is awkward. Use "were missing"
or "were not found".
Otherwise, looks good.
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss