On Thu, Aug 17, 2017 at 10:21:47PM +0200, Ancor Gonzalez Sosa wrote: > I'm thinking about adding a simple feature to libstorage-ng that I hope > will be useful to simplify the implementation of some YaST stuff. An > extra attribute Device#extra_info that the users of the library (YaST in > our case) could use to store any arbitrary information associated to > each device in the devicegraph as a free-form string. > > Why? > > While implementing advanced handling of Btrfs subvolumes in the new > expert partitioner together with Iván, I found myself in a similar > situation for second time in a short period of time. That is, > implementing a rather complex and error-prone solution for something > that could be implemented in a much more straightforward way by adding > some YaST-specific attributes to the libstorage objects. In this > particular case, having the fields BtrfsSubvolume#auto_added and maybe > also Btrfs#subvols_to_restore. > > Polluting libstorage-ng with such purpose-specific fields that has > nothing to do with the general libstorage goal doesn't look like a > bright idea. But offering a general-purpose "container" attribute would > be just a few lines of code in libstorage-ng and I can see a lot of > potential to simplify YaST code. > > What do you think? Anybody against?
Already exists, see get/set_userdata() in Device. ciao Arvin -- Arvin Schnell, <[email protected]> Senior Software Engineer, Research & Development SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
