On 7/26/07, Liane Praza <lianep at eng.sun.com> wrote: > > "Narendra Kumar S.S" writes: > > Now, I have written a code, which calls smf_enable_instance to enable > > filesystem/local service. > > Immediately after returning from this call, the next instruction, tries > to > > access a file on one of the local filesystems. > > So, are there chances that, the filesystem/local is not yet completely > > enabled and because of that, the local filesystem is not yet mounted and > > hence this instruction might fail!? > > It is completely enabled. However, enabled doesn't mean the service > is online. It means that we're trying to make it be online, but its > dependencies may not be satisfied, it may have failed, or it may just > not be online yet. > > As I said: > > > Currently, an interface which is synchronous to online/disabled is > only > > > formally available through svcadm [en|dis]able -s. I believe there's > an > > > RFE to make the synchronous semantics through libscf, but don't have > the > > > bugid to hand. It'd make a great OpenSolaris RFE, though. :) > > In the meantime, you could wait a little bit to see if smf_get_state() > returns SCF_STATE_STRING_ONLINE before continuing.
OK. So, if I have to wait a 'little bit', is there any standard or predefined value for this wait? -Narendra liane > -- > Liane Praza, Solaris Kernel Development > liane.praza at sun.com - http://blogs.sun.com/lianep > -- Warm Regards, Narendra Visit my blogs at: http://ssnarendrakumar.blogspot.com/ ___ ___ __ _ / __/ / __/ / | / / _\ \ _ \ \ / /| |/ / \___/ \___/ /_/ |__/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20070726/5339cd2c/attachment.html>