Comments on: Introducing Libstorage https://lizards.opensuse.org/2009/07/20/introducing-libstorage/ Blogs and Ramblings of the openSUSE Members Fri, 06 Mar 2020 17:50:09 +0000 hourly 1 By: Arvin Schnell https://lizards.opensuse.org/2009/07/20/introducing-libstorage/#comment-1094 Mon, 20 Jul 2009 17:16:56 +0000 http://lizards.opensuse.org/?p=1545#comment-1094 Years ago we thought about such an interface but since the scripting language used for YaST isn’t object-oriented we went for current procedural interface.

]]>
By: Robert Forsyth https://lizards.opensuse.org/2009/07/20/introducing-libstorage/#comment-1093 Mon, 20 Jul 2009 17:08:51 +0000 http://lizards.opensuse.org/?p=1545#comment-1093 Oops << not >>

]]>
By: Robert Forsyth https://lizards.opensuse.org/2009/07/20/introducing-libstorage/#comment-1092 Mon, 20 Jul 2009 17:07:44 +0000 http://lizards.opensuse.org/?p=1545#comment-1092 My >> got swallowed:
p->mountBy = “Label”;
s->Add(p); or s >> p;
s->commit();

]]>
By: Robert Forsyth https://lizards.opensuse.org/2009/07/20/introducing-libstorage/#comment-1091 Mon, 20 Jul 2009 17:04:08 +0000 http://lizards.opensuse.org/?p=1545#comment-1091 Sorry, you can scrub some of my previous comment.
I was thinking that you would model the partition with a C++ object, get/set various attributes and then commit. Perhaps like:

Partition *p = new Partition();
p->device = “/dev/sdb”;
p->size = “1GB”; or = 1073741824;
FileSystem *f = New FileSystemExt4(); or = New FileSystem(“Ext4”);
p->fileSystem = f;

p->mountBy = “Label”;
s->Add(p); or s <commit();

]]>
By: Robert Forsyth https://lizards.opensuse.org/2009/07/20/introducing-libstorage/#comment-1090 Mon, 20 Jul 2009 16:42:16 +0000 http://lizards.opensuse.org/?p=1545#comment-1090 How could you discover what values you could set as the various parameters?
Are there methods to quiz the interface about partitions, their size, file-systems, etc.
In fact, are you not just calling a series of methods like they were procedures? Could I swap the order of some of the method calls and not change the result?

]]>