Mailinglist Archive: yast-devel (127 mails)

< Previous Next >
Re: [yast-devel] New libstorage: Returning NULL pointers vs. throwing exceptions
On Tue, Nov 24, 2015 at 04:52:01PM +0100, Josef Reidinger wrote:
On Tue, 24 Nov 2015 15:59:50 +0100
Arvin Schnell <aschnell@xxxxxxxx> wrote:

On Tue, Nov 24, 2015 at 03:15:57PM +0100, Josef Reidinger wrote:

Well, in OOP is also one more approach called NullObject pattern,
which is create kind if partition table, that in represent no
partition table. Let me below show how it will behave. ( and yes, I
know it is a bit controversial pattern -

so if NoPartitionTable is used and its partitions return single
partition, that is in fact filesystem on disk.

And when you ask that single "fake" partition for it's device
name, will it be "/dev/sda" or "/dev/sda1"? Any answer is looking
for trouble, e.g. with "/dev/sda" you have several objects with
the same device name (have fun finding the right one), with
"/dev/sda1" you cannot e.g. use the device name to mount the

Well, if idea is that disk act as partition, then for me naive answer
is /dev/sda as /dev/sda is disk and also partition with file system. So
is expected that name is unique identifier of object?

Sure, for block devices the device name is a unique identifier.


Arvin Schnell, <aschnell@xxxxxxxx>
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
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >