how to check if hal is ready

Marko Anastasov marko at marko.anastasov.name
Fri Mar 3 08:58:35 PST 2006


Hal is always ready :).
What do you exactly mean by "getting no response to a usb stick"
and if "it's completely ready"? What are you trying to do?
>From what i know, a volume is ready when it's mounted. In any case,
you need to register a callback to watch a device's properties:

libhal_ctx_set_device_property_modified(hal_context,
                                        on_hal_property_modified);
libhal_device_property_watch_all(hal_context, &dbus_error);

In on_hal_property_modified you can check if a volume is mounted,
and then if its' corresponding device is the one you're watching.
Or i missed your point.

Marko


У пет, 03. 03 2006. у 13:38 +0100, double-oh-viper пише:
> Hello,
> 
> Until now I haven't got any reaction on my question below. 
> My question now is why I'm getting no response to it. Is my question
> stupid? Maybe not obvious? Or maybe there is no answer to solve it?
> You could really help me out if you know something. 
> 
> Thanks in advance.
> 
> Best regards,
> 
> Peter
> 
> --
> 
> here's my question again:
> 
> Is there a possibility to check with hal if, for example an USB-stick,
> is completely 
> ready (for using)? 
> 
> Reason is that I want to check if there are 2 (suitable) volumes
> available on the stick. If that is verified, 
> I can use the stick, otherwise, I cannot. The problem is that I can
> wait for both volumes, but I don't know 
> how long to wait if they are not available.  
> 
> 
> 
> 
> 
> 
> ------------
> 
> double-oh-viper wrote: 
> > Hello all again,
> > 
> > it has been a while ago since I asked the question below and
> > unfortunately nobody could help me out at that time. But maybe 
> > there are some new idea's now about the question, so I thought,
> > let's try again. 
> > 
> > Could someone help me out?
> > 
> > Best regards,
> > 
> > Peter
> > 
> > ---------------
> > 
> > double-oh-viper wrote: 
> > > Hello all, 
> > > 
> > > Is there a possibility to check with hal if, for example an
> > > USB-stick, is completely 
> > > ready (for using)? 
> > > 
> > > Reason is that I want to check if there are 2 (suitable) volumes
> > > available on the stick. If that is verified, 
> > > I can use the stick, otherwise, I cannot. The problem is that I
> > > can wait for both volumes, but I don't know 
> > > how long to wait if they are not available. 
> > > 
> > > Maybe you can help me how to fix this. 
> > > 
> > > Thanks in advance. 
> > > 
> > > Peter 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________ 
> > > hal mailing list 
> > > hal at lists.freedesktop.org 
> > > http://lists.freedesktop.org/mailman/listinfo/hal 
> > 
> > 
> > ____________________________________________________________________
> > 
> > _______________________________________________
> > hal mailing list
> > hal at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/hal
> >   
> 
> _______________________________________________
> hal mailing list
> hal at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/hal



More information about the hal mailing list