-1. Copyright ========= Copyright: (C) 2016 by Thomas Bruecker This program / these concepts are free software; you can redistribute it and/or modify it (if applicable) under the terms of the GNU L E S S E R General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program / these concepts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU L E S S E R General Public License for more details. You should have received a copy of the GNU L E S S E R General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Brainstorming ============= pen: * parser --> doxygen(bash) what is a "WORD"; see also "/parse.y". * "media" is correct as singular for mass-storage-media. * "realize" is correct for 'bring into reality'. * use the term "UUID" instead of "GUID" ("guid" has some 'twirks'.) * container-media: contains one or more sub-medias * container method for containers where * every sub-media has its own media info, * media is a disk with partition-table --> own method with only global mandatory parameters; the sub-medias are sufficiently specified by the partition-table. * some sub-medias have their own media info, none of its sub-medias has its own media info. * the sub-media has its own media info; "M" and "MM" are arrays. * M[]='' * the sub-media does not have its own media info: * MM[]=':'; * this may be nested and nesting is absolutely legal, but ev. not recommended. --> parser: * parses the container for sub-media with index = n; for * "M" return "QualifiedPath" * "MM" ... * container with "RealizeThis" --> "ShowThis" for the whole container; --> "you must provide index". * sub-media: ... is also container-media for its sub-medias. * realized media a media that is immediately accessible by the os-kernel; e.g. therefore an usb-stick laying on a table is not a "realized media" * pen: MediaInfo # finally fixed # 8 * 512 = 4096 * when we access 'a media' we get at least: * start-point (sector) of that media (at begin of info of that media). * Startseite: * Medienpuff Hds, cds. dvs, usb sticks, tapes ev. disketten. * "?", rot: fragen koennen Sie sich selbst wir konstruieren Antworten; klicken sie biite auf * "!", gruen: zum konzept, * "? --> !". * QualifiedMediaPath of a realized media: * QualifiedCompleteMediaPath": * "device:"; e.g "device:/dev/sda5", * "withOffset:" to the media-info>:"; is a device; filesystems may not have an offset; e.g., because the standard place of a media-info is at the begin of the container-media; "device:/dev/sda5" == "withOffset:0:/dev/sda5". * "filesystem:"; e.g "filesystem:/mnt/tmp", * "file:"; * "QualifiedComponentMediaPath" of a realized component-media: * a path to a media that is part of another media and that may not be operated on its own; e.g. a raid-component. * ":" * every method has to return * if it completes successfully, the return value "0", and to print to "stdout" the QualifiedMediaPath of the realized media. * parameters: * types: * mandatory: must be set; and handled; * mandatory and ignored: may be set; must be accepted if set, and must not be handled (e.g "KERNEL='...'"). * optional: may be set; and must be handled, if set. * optional and ignored: may be set; must be accepted if set, and must not be handled. * globally defined and may be set; must be accepted by every method that mandatory: is defined. * globally defined, must be set; and handled by every method that optional and ignored: is defined if set, and must not be handled by every method that is defined. * pen^: static and variable parameters. * the semantic meaning of a parameter is defined by its name; the order of the parameters in the method-call-body shall not influence the semantic meanings of the parameters. * list of component-medias * list of not-yet-realized container-medias (waiting for component-medias). * generalized methods and concepts that describe or specify how to access mass storage medias, partitions, lvm (locical vo)-partitions (e.g. linux-dm-^targets), encrypted or compressed stuff, raids, files etc. * e.g. you have a linux raid 1, that consists on /dev/sda1", /dev/sdb1 and a bimap device provided through "/dev/loop0" on the file "/mnt/system-files/bitmap-md0". * you want, that also a non-linux user may simply see, or in case of urgence, that SubMediaOf * MediaAccess_ Realize # whole chain / tree * "-s" show only the media-name of the media that would be realized by ... * MediaAccess_ Show # whole chain / tree * MediaAccess_ ShowNext # realizes the media given as argument and 'ShowOne'. * MediaAccess_ ShowThis * Contents.TXT --> * DiskContents.TXT --> * also for disks of virtual machines. * a file with just one 'significant' partition on it may be realized directli as this partition. (by "losetup -o ..."), (device-name: filename). (put name of loop device in foldder).