Mailinglist Archive: yast-devel (73 mails)

< Previous Next >
[yast-devel] Important Changes to Storage
  • From: Arvin Schnell <aschnell@xxxxxxx>
  • Date: Sun, 3 Aug 2008 17:08:02 +0200
  • Message-id: <20080803150801.GA23902@xxxxxxx>

Hi Hackers,

for fate #302971 I had to implement a lock for libstorage. This
has some consequences for everyone using storage in YaST.

The initialisation of libstorage fails if there is another
process holding a lock. I have extended Storage::InitLibstorage
to display a popup in that case (unfinished). The user can retry
to initialise libstorage.

The problem is that so far nobody explicitly initialises
libstorage. This is more or less required now since you have to
take action when locking fails (e.g. gracefully abort). So call
Storage::InitLibstorage(readonly) before doing any other storage
calls. You can set readonly to true if you are sure your code and
no code you call modifies storage.

If you do not call Storage::InitLibstorage() the first storage
function will do so. But if initialisation fails all storage
functions requiring libstorage return nil (if they return
anything) or crash (if they don't check for proper
initialisation).

Comments for improvement to the situation are welcome.

ciao
Arvin

--
Arvin Schnell, <aschnell@xxxxxxx>
Software Engineer, Research & Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N├╝rnberg)
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups