|
yast2-storage
|
00001 /* 00002 * Copyright (c) [2004-2010] Novell, Inc. 00003 * 00004 * All Rights Reserved. 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of version 2 of the GNU General Public License as published 00008 * by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, but WITHOUT 00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00013 * more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, contact Novell, Inc. 00017 * 00018 * To contact Novell about this file by physical or electronic mail, you may 00019 * find current contact information at www.novell.com. 00020 */ 00021 00022 00023 #ifndef STORAGE_INTERFACE_H 00024 #define STORAGE_INTERFACE_H 00025 00026 00027 #include <string> 00028 #include <deque> 00029 #include <list> 00030 00031 using std::string; 00032 using std::deque; 00033 using std::list; 00034 00035 00133 namespace storage 00134 { 00135 enum FsType { FSUNKNOWN, REISERFS, EXT2, EXT3, EXT4, BTRFS, VFAT, XFS, JFS, HFS, NTFS, 00136 SWAP, HFSPLUS, NFS, NFS4, TMPFS, FSNONE }; 00137 00138 enum PartitionType { PRIMARY, EXTENDED, LOGICAL, PTYPE_ANY }; 00139 00140 enum MountByType { MOUNTBY_DEVICE, MOUNTBY_UUID, MOUNTBY_LABEL, MOUNTBY_ID, MOUNTBY_PATH }; 00141 00142 enum EncryptType { ENC_NONE, ENC_TWOFISH, ENC_TWOFISH_OLD, 00143 ENC_TWOFISH256_OLD, ENC_LUKS, ENC_UNKNOWN }; 00144 00145 enum MdType { RAID_UNK, RAID0, RAID1, RAID5, RAID6, RAID10, MULTIPATH }; 00146 00147 enum MdParity { PAR_DEFAULT, LEFT_ASYMMETRIC, LEFT_SYMMETRIC, 00148 RIGHT_ASYMMETRIC, RIGHT_SYMMETRIC, PAR_FIRST, PAR_LAST, 00149 LEFT_ASYMMETRIC_6, LEFT_SYMMETRIC_6, RIGHT_ASYMMETRIC_6, 00150 RIGHT_SYMMETRIC_6, PAR_FIRST_6, 00151 PAR_NEAR_2, PAR_OFFSET_2, PAR_FAR_2, 00152 PAR_NEAR_3, PAR_OFFSET_3, PAR_FAR_3 }; 00153 00154 enum MdArrayState { UNKNOWN, CLEAR, INACTIVE, SUSPENDED, READONLY, READ_AUTO, 00155 CLEAN, ACTIVE, WRITE_PENDING, ACTIVE_IDLE }; 00156 00157 enum UsedByType { UB_NONE, UB_LVM, UB_MD, UB_MDPART, UB_DM, UB_DMRAID, UB_DMMULTIPATH, UB_BTRFS }; 00158 00159 enum CType { CUNKNOWN, DISK, MD, LOOP, LVM, DM, DMRAID, NFSC, DMMULTIPATH, MDPART, BTRFSC, TMPFSC }; 00160 00161 enum Transport { TUNKNOWN, SBP, ATA, FC, ISCSI, SAS, SATA, SPI, USB, FCOE }; 00162 00163 enum ImsmDriver { IMSM_UNDECIDED, IMSM_DMRAID, IMSM_MDADM }; 00164 00165 enum MultipathAutostart { MPAS_UNDECIDED, MPAS_ON, MPAS_OFF }; 00166 00167 enum PartAlign { ALIGN_OPTIMAL, ALIGN_CYLINDER }; 00168 00169 00174 typedef void (*CallbackProgressBar)(const string& id, unsigned cur, unsigned max); 00175 00180 typedef void (*CallbackShowInstallInfo)(const string& id); 00181 00186 typedef void (*CallbackInfoPopup)(const string& text); 00187 00194 typedef bool (*CallbackYesNoPopup)(const string& text); 00195 00201 typedef bool (*CallbackCommitErrorPopup)(int error, const string& last_action, 00202 const string& extended_message); 00203 00209 typedef bool (*CallbackPasswordPopup)(const string& device, int attempts, string& password); 00210 00211 00215 struct FsCapabilities 00216 { 00217 FsCapabilities() {} 00218 bool isExtendable; 00219 bool isExtendableWhileMounted; 00220 bool isReduceable; 00221 bool isReduceableWhileMounted; 00222 bool supportsUuid; 00223 bool supportsLabel; 00224 bool labelWhileMounted; 00225 unsigned int labelLength; 00226 unsigned long long minimalFsSizeK; 00227 }; 00228 00232 struct DlabelCapabilities 00233 { 00234 DlabelCapabilities() {} 00235 unsigned maxPrimary; 00236 bool extendedPossible; 00237 unsigned maxLogical; 00238 unsigned long long maxSectors; 00239 }; 00240 00241 00242 struct UsedByInfo 00243 { 00244 UsedByInfo(UsedByType type, const string& device) : type(type), device(device) {} 00245 UsedByType type; 00246 string device; 00247 }; 00248 00249 00250 struct SubvolInfo 00251 { 00252 SubvolInfo(const string& path) : path(path) {} 00253 string path; 00254 }; 00255 00256 00257 struct ResizeInfo 00258 { 00259 ResizeInfo() : df_freeK(0), resize_freeK(0), usedK(0), resize_ok(false) {} 00260 unsigned long long df_freeK; 00261 unsigned long long resize_freeK; 00262 unsigned long long usedK; 00263 bool resize_ok; 00264 }; 00265 00266 00267 struct ContentInfo 00268 { 00269 ContentInfo() : windows(false), efi(false), homes(0) {} 00270 bool windows; 00271 bool efi; 00272 unsigned homes; 00273 }; 00274 00275 00279 struct ContainerInfo 00280 { 00281 ContainerInfo() {} 00282 CType type; 00283 string device; 00284 string name; 00285 string udevPath; 00286 string udevId; 00287 list<UsedByInfo> usedBy; 00288 UsedByType usedByType; // deprecated 00289 string usedByDevice; // deprecated 00290 bool readonly; 00291 }; 00292 00296 struct DiskInfo 00297 { 00298 DiskInfo() {} 00299 unsigned long long sizeK; 00300 unsigned long long cylSize; 00301 unsigned long cyl; 00302 unsigned long heads; 00303 unsigned long sectors; 00304 unsigned int sectorSize; 00305 string disklabel; 00306 string orig_disklabel; 00307 unsigned maxPrimary; 00308 bool extendedPossible; 00309 unsigned maxLogical; 00310 bool initDisk; 00311 Transport transport; 00312 bool has_fake_partition; 00313 bool iscsi; // deprecated 00314 }; 00315 00319 struct LvmVgInfo 00320 { 00321 LvmVgInfo() {} 00322 unsigned long long sizeK; 00323 unsigned long long peSizeK; 00324 unsigned long peCount; 00325 unsigned long peFree; 00326 string uuid; 00327 bool lvm2; 00328 bool create; 00329 string devices; 00330 string devices_add; 00331 string devices_rem; 00332 }; 00333 00337 struct DmPartCoInfo 00338 { 00339 DmPartCoInfo() {} 00340 DiskInfo d; 00341 string devices; 00342 unsigned long minor; 00343 }; 00344 00345 struct DmraidCoInfo 00346 { 00347 DmraidCoInfo() {} 00348 DmPartCoInfo p; 00349 }; 00350 00351 struct DmmultipathCoInfo 00352 { 00353 DmmultipathCoInfo() {} 00354 DmPartCoInfo p; 00355 string vendor; 00356 string model; 00357 }; 00358 00362 struct VolumeInfo 00363 { 00364 VolumeInfo() {} 00365 unsigned long long sizeK; 00366 unsigned long major; 00367 unsigned long minor; 00368 string name; 00369 string device; 00370 string mount; 00371 string crypt_device; 00372 MountByType mount_by; 00373 string udevPath; 00374 string udevId; 00375 list<UsedByInfo> usedBy; 00376 UsedByType usedByType; // deprecated 00377 string usedByDevice; // deprecated 00378 bool ignore_fstab; 00379 string fstab_options; 00380 string uuid; 00381 string label; 00382 string mkfs_options; 00383 string tunefs_options; 00384 string loop; 00385 string dtxt; 00386 EncryptType encryption; 00387 string crypt_pwd; 00388 FsType fs; 00389 FsType detected_fs; 00390 bool format; 00391 bool create; 00392 bool is_mounted; 00393 bool resize; 00394 bool ignore_fs; 00395 unsigned long long origSizeK; 00396 }; 00397 00398 struct PartitionAddInfo 00399 { 00400 PartitionAddInfo() {} 00401 unsigned nr; 00402 unsigned long cylStart; 00403 unsigned long cylSize; 00404 PartitionType partitionType; 00405 unsigned id; 00406 bool boot; 00407 }; 00408 00412 struct PartitionInfo 00413 { 00414 PartitionInfo() {} 00415 PartitionInfo& operator=( const PartitionAddInfo& rhs ); 00416 VolumeInfo v; 00417 unsigned nr; 00418 unsigned long cylStart; 00419 unsigned long cylSize; 00420 PartitionType partitionType; 00421 unsigned id; 00422 bool boot; 00423 }; 00424 00428 struct LvmLvInfo 00429 { 00430 LvmLvInfo() {} 00431 VolumeInfo v; 00432 unsigned stripes; 00433 unsigned stripeSizeK; 00434 string uuid; 00435 string status; 00436 string allocation; 00437 string dm_table; 00438 string dm_target; 00439 string origin; 00440 string used_pool; 00441 bool pool; 00442 }; 00443 00447 struct LvmLvSnapshotStateInfo 00448 { 00449 LvmLvSnapshotStateInfo() {} 00450 bool active; 00451 double allocated; 00452 }; 00453 00457 struct MdInfo 00458 { 00459 MdInfo() {} 00460 VolumeInfo v; 00461 unsigned nr; 00462 unsigned type; 00463 unsigned parity; 00464 string uuid; 00465 string sb_ver; 00466 unsigned long chunkSizeK; 00467 string devices; 00468 string spares; 00469 bool inactive; 00470 }; 00471 00475 struct MdStateInfo 00476 { 00477 MdStateInfo() {} 00478 MdArrayState state; 00479 }; 00480 00485 struct MdPartCoInfo 00486 { 00487 MdPartCoInfo() {} 00488 DiskInfo d; 00489 unsigned type; // RAID level 00490 unsigned nr; // MD device number 00491 unsigned parity; // Parity (not for all RAID level) 00492 string uuid; // MD Device UUID 00493 string sb_ver; // Metadata version 00494 unsigned long chunkSizeK; // Chunksize (strip size) 00495 string devices; 00496 string spares; 00497 }; 00498 00499 struct MdPartCoStateInfo 00500 { 00501 MdPartCoStateInfo() {} 00502 MdArrayState state; 00503 }; 00504 00508 struct MdPartInfo 00509 { 00510 MdPartInfo() {} 00511 VolumeInfo v; 00512 PartitionAddInfo p; 00513 bool part; 00514 }; 00515 00519 struct NfsInfo 00520 { 00521 NfsInfo() {} 00522 VolumeInfo v; 00523 }; 00524 00528 struct LoopInfo 00529 { 00530 LoopInfo() {} 00531 VolumeInfo v; 00532 bool reuseFile; 00533 unsigned nr; 00534 string file; 00535 }; 00536 00540 struct BtrfsInfo 00541 { 00542 BtrfsInfo() {} 00543 VolumeInfo v; 00544 string devices; 00545 string devices_add; 00546 string devices_rem; 00547 string subvol; 00548 string subvol_add; 00549 string subvol_rem; 00550 }; 00551 00555 struct TmpfsInfo 00556 { 00557 TmpfsInfo() {} 00558 VolumeInfo v; 00559 }; 00560 00564 struct DmInfo 00565 { 00566 DmInfo() {} 00567 VolumeInfo v; 00568 unsigned nr; 00569 string table; 00570 string target; 00571 }; 00572 00576 struct DmPartInfo 00577 { 00578 DmPartInfo() {} 00579 VolumeInfo v; 00580 PartitionAddInfo p; 00581 bool part; 00582 string table; 00583 string target; 00584 }; 00585 00589 struct DmraidInfo 00590 { 00591 DmraidInfo() {} 00592 DmPartInfo p; 00593 }; 00594 00598 struct DmmultipathInfo 00599 { 00600 DmmultipathInfo() {} 00601 DmPartInfo p; 00602 }; 00603 00607 struct ContVolInfo 00608 { 00609 ContVolInfo() : ctype(CUNKNOWN), num(-1) {} 00610 CType ctype; 00611 string cname; 00612 string cdevice; 00613 string vname; 00614 string vdevice; 00615 int num; 00616 }; 00617 00621 struct PartitionSlotInfo 00622 { 00623 PartitionSlotInfo() {} 00624 unsigned long cylStart; 00625 unsigned long cylSize; 00626 bool primarySlot; 00627 bool primaryPossible; 00628 bool extendedSlot; 00629 bool extendedPossible; 00630 bool logicalSlot; 00631 bool logicalPossible; 00632 }; 00633 00637 struct CommitInfo 00638 { 00639 CommitInfo() {} 00640 bool destructive; 00641 string text; 00642 }; 00643 00644 00648 enum ErrorCodes 00649 { 00650 STORAGE_NO_ERROR = 0, 00651 00652 DISK_PARTITION_OVERLAPS_EXISTING = -1000, 00653 DISK_PARTITION_EXCEEDS_DISK = -1001, 00654 DISK_CREATE_PARTITION_EXT_ONLY_ONCE = -1002, 00655 DISK_CREATE_PARTITION_EXT_IMPOSSIBLE = -1003, 00656 DISK_PARTITION_NO_FREE_NUMBER = -1004, 00657 DISK_CREATE_PARTITION_INVALID_VOLUME = -1005, 00658 DISK_CREATE_PARTITION_INVALID_TYPE = -1006, 00659 DISK_CREATE_PARTITION_PARTED_FAILED = -1007, 00660 DISK_PARTITION_NOT_FOUND = -1008, 00661 DISK_CREATE_PARTITION_LOGICAL_NO_EXT = -1009, 00662 DISK_PARTITION_LOGICAL_OUTSIDE_EXT = -1010, 00663 DISK_SET_TYPE_INVALID_VOLUME = -1011, 00664 DISK_SET_TYPE_PARTED_FAILED = -1012, 00665 DISK_SET_LABEL_PARTED_FAILED = -1013, 00666 DISK_REMOVE_PARTITION_PARTED_FAILED = -1014, 00667 DISK_REMOVE_PARTITION_INVALID_VOLUME = -1015, 00668 DISK_REMOVE_PARTITION_LIST_ERASE = -1016, 00669 DISK_DESTROY_TABLE_INVALID_LABEL = -1017, 00670 DISK_PARTITION_ZERO_SIZE = -1018, 00671 DISK_CHANGE_READONLY = -1019, 00672 DISK_RESIZE_PARTITION_INVALID_VOLUME = -1020, 00673 DISK_RESIZE_PARTITION_PARTED_FAILED = -1021, 00674 DISK_RESIZE_NO_SPACE = -1022, 00675 DISK_CHECK_RESIZE_INVALID_VOLUME = -1023, 00676 DISK_REMOVE_PARTITION_CREATE_NOT_FOUND = -1024, 00677 DISK_COMMIT_NOTHING_TODO = -1025, 00678 DISK_CREATE_PARTITION_NO_SPACE = -1026, 00679 DISK_REMOVE_USED_BY = -1027, 00680 DISK_INIT_NOT_POSSIBLE = -1028, 00681 DISK_INVALID_PARTITION_ID = -1029, 00682 00683 STORAGE_DISK_NOT_FOUND = -2000, 00684 STORAGE_VOLUME_NOT_FOUND = -2001, 00685 STORAGE_REMOVE_PARTITION_INVALID_CONTAINER = -2002, 00686 STORAGE_CHANGE_PARTITION_ID_INVALID_CONTAINER = -2003, 00687 STORAGE_CHANGE_READONLY = -2004, 00688 STORAGE_DISK_USED_BY = -2005, 00689 STORAGE_LVM_VG_EXISTS = -2006, 00690 STORAGE_LVM_VG_NOT_FOUND = -2007, 00691 STORAGE_LVM_INVALID_DEVICE = -2008, 00692 STORAGE_CONTAINER_NOT_FOUND = -2009, 00693 STORAGE_VG_INVALID_NAME = -2010, 00694 STORAGE_REMOVE_USED_VOLUME = -2011, 00695 STORAGE_REMOVE_USING_UNKNOWN_TYPE = -2012, 00696 STORAGE_NOT_YET_IMPLEMENTED = -2013, 00697 STORAGE_MD_INVALID_NAME = -2014, 00698 STORAGE_MD_NOT_FOUND = -2015, 00699 STORAGE_MEMORY_EXHAUSTED = -2016, 00700 STORAGE_LOOP_NOT_FOUND = -2017, 00701 STORAGE_CREATED_LOOP_NOT_FOUND = -2018, 00702 STORAGE_CHANGE_AREA_INVALID_CONTAINER = -2023, 00703 STORAGE_BACKUP_STATE_NOT_FOUND = -2024, 00704 STORAGE_INVALID_FSTAB_VALUE = -2025, 00705 STORAGE_NO_FSTAB_PTR = -2026, 00706 STORAGE_DEVICE_NODE_NOT_FOUND = -2027, 00707 STORAGE_DMRAID_CO_NOT_FOUND = -2028, 00708 STORAGE_RESIZE_INVALID_CONTAINER = -2029, 00709 STORAGE_DMMULTIPATH_CO_NOT_FOUND = -2030, 00710 STORAGE_ZERO_DEVICE_FAILED = -2031, 00711 STORAGE_INVALID_BACKUP_STATE_NAME = -2032, 00712 STORAGE_MDPART_CO_NOT_FOUND = -2033, 00713 STORAGE_DEVICE_NOT_FOUND = -2034, 00714 STORAGE_BTRFS_CO_NOT_FOUND = -2035, 00715 STORAGE_TMPFS_CO_NOT_FOUND = -2036, 00716 00717 VOLUME_COMMIT_UNKNOWN_STAGE = -3000, 00718 VOLUME_FSTAB_EMPTY_MOUNT = -3001, 00719 VOLUME_UMOUNT_FAILED = -3002, 00720 VOLUME_MOUNT_FAILED = -3003, 00721 VOLUME_FORMAT_UNKNOWN_FS = -3005, 00722 VOLUME_FORMAT_FS_UNDETECTED = -3006, 00723 VOLUME_FORMAT_FS_TOO_SMALL = -3007, 00724 VOLUME_FORMAT_FAILED = -3008, 00725 VOLUME_TUNE2FS_FAILED = -3009, 00726 VOLUME_MKLABEL_FS_UNABLE = -3010, 00727 VOLUME_MKLABEL_FAILED = -3011, 00728 VOLUME_LOSETUP_NO_LOOP = -3012, 00729 VOLUME_LOSETUP_FAILED = -3013, 00730 VOLUME_CRYPT_NO_PWD = -3014, 00731 VOLUME_CRYPT_PWD_TOO_SHORT = -3015, 00732 VOLUME_CRYPT_NOT_DETECTED = -3016, 00733 VOLUME_FORMAT_EXTENDED_UNSUPPORTED = -3017, 00734 VOLUME_MOUNT_EXTENDED_UNSUPPORTED = -3018, 00735 VOLUME_MOUNT_POINT_INVALID = -3019, 00736 VOLUME_MOUNTBY_NOT_ENCRYPTED = -3020, 00737 VOLUME_MOUNTBY_UNSUPPORTED_BY_FS = -3021, 00738 VOLUME_LABEL_NOT_SUPPORTED = -3022, 00739 VOLUME_LABEL_TOO_LONG = -3023, 00740 VOLUME_LABEL_WHILE_MOUNTED = -3024, 00741 VOLUME_RESIZE_UNSUPPORTED_BY_FS = -3025, 00742 VOLUME_RESIZE_UNSUPPORTED_BY_CONTAINER = -3026, 00743 VOLUME_RESIZE_FAILED = -3027, 00744 VOLUME_ALREADY_IN_USE = -3028, 00745 VOLUME_LOUNSETUP_FAILED = -3029, 00746 VOLUME_DEVICE_NOT_PRESENT = -3030, 00747 VOLUME_DEVICE_NOT_BLOCK = -3031, 00748 VOLUME_MOUNTBY_UNSUPPORTED_BY_VOLUME = -3032, 00749 VOLUME_CRYPTFORMAT_FAILED = -3033, 00750 VOLUME_CRYPTSETUP_FAILED = -3034, 00751 VOLUME_CRYPTUNSETUP_FAILED = -3035, 00752 VOLUME_FORMAT_NOT_IMPLEMENTED = -3036, 00753 VOLUME_FORMAT_IMPOSSIBLE = -3037, 00754 VOLUME_CRYPT_NFS_IMPOSSIBLE = -3038, 00755 VOLUME_REMOUNT_FAILED = -3039, 00756 VOLUME_TUNEREISERFS_FAILED = -3040, 00757 VOLUME_UMOUNT_NOT_MOUNTED = -3041, 00758 VOLUME_BTRFS_ADD_FAILED = -3042, 00759 VOLUME_CANNOT_TMP_MOUNT = -3043, 00760 VOLUME_CANNOT_TMP_UMOUNT = -3044, 00761 VOLUME_BTRFS_SUBVOL_INIT_FAILED = -3045, 00762 VOLUME_BTRFS_SUBVOL_DETDEFAULT = -3046, 00763 00764 LVM_CREATE_PV_FAILED = -4000, 00765 LVM_PV_ALREADY_CONTAINED = -4001, 00766 LVM_PV_DEVICE_UNKNOWN = -4002, 00767 LVM_PV_DEVICE_USED = -4003, 00768 LVM_VG_HAS_NONE_PV = -4004, 00769 LVM_LV_INVALID_NAME = -4005, 00770 LVM_LV_DUPLICATE_NAME = -4006, 00771 LVM_LV_NO_SPACE = -4007, 00772 LVM_LV_UNKNOWN_NAME = -4008, 00773 LVM_LV_NOT_IN_LIST = -4009, 00774 LVM_VG_CREATE_FAILED = -4010, 00775 LVM_VG_EXTEND_FAILED = -4011, 00776 LVM_VG_REDUCE_FAILED = -4012, 00777 LVM_VG_REMOVE_FAILED = -4013, 00778 LVM_LV_CREATE_FAILED = -4014, 00779 LVM_LV_REMOVE_FAILED = -4015, 00780 LVM_LV_RESIZE_FAILED = -4016, 00781 LVM_PV_STILL_ADDED = -4017, 00782 LVM_PV_REMOVE_NOT_FOUND = -4018, 00783 LVM_CREATE_LV_INVALID_VOLUME = -4019, 00784 LVM_REMOVE_LV_INVALID_VOLUME = -4020, 00785 LVM_RESIZE_LV_INVALID_VOLUME = -4021, 00786 LVM_CHANGE_READONLY = -4022, 00787 LVM_CHECK_RESIZE_INVALID_VOLUME = -4023, 00788 LVM_COMMIT_NOTHING_TODO = -4024, 00789 LVM_LV_REMOVE_USED_BY = -4025, 00790 LVM_LV_ALREADY_ON_DISK = -4026, 00791 LVM_LV_NO_STRIPE_SIZE = -4027, 00792 LVM_LV_UNKNOWN_ORIGIN = -4028, 00793 LVM_LV_NOT_ON_DISK = -4029, 00794 LVM_LV_NOT_SNAPSHOT = -4030, 00795 LVM_LV_HAS_SNAPSHOTS = -4031, 00796 LVM_LV_IS_SNAPSHOT = -4032, 00797 LVM_LIST_EMPTY = -4033, 00798 LVM_LV_NO_POOL_OR_SNAP = -4034, 00799 LVM_LV_NO_POOL = -4035, 00800 LVM_LV_UNKNOWN_POOL = -4036, 00801 LVM_LV_INVALID_CHUNK_SIZE = -4037, 00802 LVM_LV_POOL_NO_FORMAT = -4038, 00803 LVM_LV_POOL_NO_MOUNT = -4039, 00804 00805 FSTAB_ENTRY_NOT_FOUND = -5000, 00806 FSTAB_CHANGE_PREFIX_IMPOSSIBLE = -5001, 00807 FSTAB_REMOVE_ENTRY_NOT_FOUND = -5002, 00808 FSTAB_UPDATE_ENTRY_NOT_FOUND = -5003, 00809 FSTAB_ADD_ENTRY_FOUND = -5004, 00810 00811 MD_CHANGE_READONLY = -6000, 00812 MD_DUPLICATE_NUMBER = -6001, 00813 MD_TOO_FEW_DEVICES = -6002, 00814 MD_DEVICE_UNKNOWN = -6003, 00815 MD_DEVICE_USED = -6004, 00816 MD_CREATE_INVALID_VOLUME = -6005, 00817 MD_REMOVE_FAILED = -6006, 00818 MD_NOT_IN_LIST = -6007, 00819 MD_CREATE_FAILED = -6008, 00820 MD_UNKNOWN_NUMBER = -6009, 00821 MD_REMOVE_USED_BY = -6010, 00822 MD_NUMBER_TOO_LARGE = -6011, 00823 MD_REMOVE_INVALID_VOLUME = -6012, 00824 MD_REMOVE_CREATE_NOT_FOUND = -6013, 00825 MD_NO_RESIZE_ON_DISK = -6014, 00826 MD_ADD_DUPLICATE = -6015, 00827 MD_REMOVE_NONEXISTENT = -6016, 00828 MD_NO_CHANGE_ON_DISK = -6017, 00829 MD_NO_CREATE_UNKNOWN = -6018, 00830 MD_STATE_NOT_ON_DISK = -6019, 00831 MD_PARTITION_NOT_FOUND = -6020, 00832 MD_INVALID_PARITY = -6021, 00833 MD_TOO_MANY_SPARES = -6022, 00834 MD_GET_STATE_FAILED = -6023, 00835 00836 MDPART_CHANGE_READONLY = -6100, 00837 MDPART_INTERNAL_ERR = -6101, 00838 MDPART_INVALID_VOLUME = -6012, 00839 MDPART_PARTITION_NOT_FOUND = -6103, 00840 MDPART_REMOVE_PARTITION_LIST_ERASE = -6104, 00841 MDPART_COMMIT_NOTHING_TODO = -6105, 00842 MDPART_NO_REMOVE = -6106, 00843 MDPART_DEVICE_NOT_FOUND = -6107, 00844 00845 LOOP_CHANGE_READONLY = -7000, 00846 LOOP_DUPLICATE_FILE = -7001, 00847 LOOP_UNKNOWN_FILE = -7002, 00848 LOOP_REMOVE_USED_BY = -7003, 00849 LOOP_FILE_CREATE_FAILED = -7004, 00850 LOOP_CREATE_INVALID_VOLUME = -7005, 00851 LOOP_REMOVE_FILE_FAILED = -7006, 00852 LOOP_REMOVE_INVALID_VOLUME = -7007, 00853 LOOP_NOT_IN_LIST = -7008, 00854 LOOP_REMOVE_CREATE_NOT_FOUND = -7009, 00855 LOOP_MODIFY_EXISTING = -7010, 00856 00857 PEC_PE_SIZE_INVALID = -9000, 00858 PEC_PV_NOT_FOUND = -9001, 00859 PEC_REMOVE_PV_IN_USE = -9002, 00860 PEC_REMOVE_PV_SIZE_NEEDED = -9003, 00861 PEC_LV_NO_SPACE_STRIPED = -9004, 00862 PEC_LV_NO_SPACE_SINGLE = -9005, 00863 PEC_LV_PE_DEV_NOT_FOUND = -9006, 00864 00865 DM_CHANGE_READONLY = -10000, 00866 DM_UNKNOWN_TABLE = -10001, 00867 DM_REMOVE_USED_BY = -10002, 00868 DM_REMOVE_CREATE_NOT_FOUND = -10003, 00869 DM_REMOVE_INVALID_VOLUME = -10004, 00870 DM_REMOVE_FAILED = -10005, 00871 DM_NOT_IN_LIST = -10006, 00872 00873 DASD_NOT_POSSIBLE = -11000, 00874 DASD_FDASD_FAILED = -11001, 00875 DASD_DASDFMT_FAILED = -11002, 00876 00877 DMPART_CHANGE_READONLY = -12001, 00878 DMPART_INTERNAL_ERR = -12002, 00879 DMPART_INVALID_VOLUME = -12003, 00880 DMPART_PARTITION_NOT_FOUND = -12004, 00881 DMPART_REMOVE_PARTITION_LIST_ERASE = -12005, 00882 DMPART_COMMIT_NOTHING_TODO = -12006, 00883 DMPART_NO_REMOVE = -12007, 00884 00885 DMRAID_REMOVE_FAILED = -13001, 00886 00887 NFS_VOLUME_NOT_FOUND = -14001, 00888 NFS_CHANGE_READONLY = -14002, 00889 NFS_REMOVE_VOLUME_CREATE_NOT_FOUND = -14003, 00890 NFS_REMOVE_VOLUME_LIST_ERASE = -14004, 00891 NFS_REMOVE_INVALID_VOLUME = -14005, 00892 00893 BTRFS_COMMIT_INVALID_VOLUME = -15001, 00894 BTRFS_CANNOT_TMP_MOUNT = -15002, 00895 BTRFS_CANNOT_TMP_UMOUNT = -15003, 00896 BTRFS_DELETE_SUBVOL_FAIL = -15004, 00897 BTRFS_CREATE_SUBVOL_FAIL = -15005, 00898 BTRFS_VOLUME_NOT_FOUND = -15006, 00899 BTRFS_SUBVOL_EXISTS = -15007, 00900 BTRFS_SUBVOL_NON_EXISTS = -15008, 00901 BTRFS_REMOVE_NOT_FOUND = -15009, 00902 BTRFS_REMOVE_NO_BTRFS = -15010, 00903 BTRFS_REMOVE_INVALID_VOLUME = -15011, 00904 BTRFS_CHANGE_READONLY = -15012, 00905 BTRFS_DEV_ALREADY_CONTAINED = -15013, 00906 BTRFS_DEVICE_UNKNOWN = -15014, 00907 BTRFS_DEVICE_USED = -15015, 00908 BTRFS_HAS_NONE_DEV = -15016, 00909 BTRFS_DEV_NOT_FOUND = -15017, 00910 BTRFS_EXTEND_FAIL = -15018, 00911 BTRFS_REDUCE_FAIL = -15019, 00912 BTRFS_LIST_EMPTY = -15020, 00913 BTRFS_RESIZE_INVALID_VOLUME = -15021, 00914 BTRFS_MULTIDEV_SHRINK_UNSUPPORTED = -15022, 00915 00916 TMPFS_REMOVE_INVALID_VOLUME = -16001, 00917 TMPFS_REMOVE_NO_TMPFS = -16002, 00918 TMPFS_REMOVE_NOT_FOUND = -16003, 00919 00920 CONTAINER_INTERNAL_ERROR = -99000, 00921 CONTAINER_INVALID_VIRTUAL_CALL = -99001, 00922 00923 }; 00924 00925 00929 class StorageInterface 00930 { 00931 public: 00932 00933 StorageInterface () {} 00934 virtual ~StorageInterface () {} 00935 00939 virtual void getContainers( deque<ContainerInfo>& infos) = 0; 00940 00948 virtual int getDiskInfo( const string& disk, DiskInfo& info) = 0; 00949 00958 virtual int getContDiskInfo( const string& disk, ContainerInfo& cinfo, 00959 DiskInfo& info ) = 0; 00960 00968 virtual int getLvmVgInfo( const string& name, LvmVgInfo& info) = 0; 00969 00978 virtual int getContLvmVgInfo( const string& name, ContainerInfo& cinfo, 00979 LvmVgInfo& info) = 0; 00980 00988 virtual int getDmraidCoInfo( const string& name, DmraidCoInfo& info) = 0; 00989 00998 virtual int getContDmraidCoInfo( const string& name, ContainerInfo& cinfo, 00999 DmraidCoInfo& info) = 0; 01000 01008 virtual int getDmmultipathCoInfo( const string& name, DmmultipathCoInfo& info) = 0; 01009 01018 virtual int getContDmmultipathCoInfo( const string& name, ContainerInfo& cinfo, 01019 DmmultipathCoInfo& info) = 0; 01020 01028 virtual int getMdPartCoInfo( const string& name, MdPartCoInfo& info) = 0; 01029 01030 01039 virtual int getContMdPartCoInfo( const string& name, ContainerInfo& cinfo, 01040 MdPartCoInfo& info) = 0; 01041 01047 virtual void setImsmDriver(ImsmDriver driver) = 0; 01048 01054 virtual ImsmDriver getImsmDriver() const = 0; 01055 01061 virtual void setMultipathAutostart(MultipathAutostart multipath_autostart) = 0; 01062 01068 virtual MultipathAutostart getMultipathAutostart() const = 0; 01069 01075 virtual void getVolumes( deque<VolumeInfo>& infos) = 0; 01076 01084 virtual int getVolume( const string& device, VolumeInfo& info) = 0; 01085 01093 virtual int getPartitionInfo( const string& disk, 01094 deque<PartitionInfo>& plist ) = 0; 01095 01103 virtual int getLvmLvInfo( const string& name, 01104 deque<LvmLvInfo>& plist ) = 0; 01105 01112 virtual int getMdInfo( deque<MdInfo>& plist ) = 0; 01113 01121 virtual int getMdPartInfo( const string& device, 01122 deque<MdPartInfo>& plist ) = 0; 01123 01130 virtual int getNfsInfo( deque<NfsInfo>& plist ) = 0; 01131 01138 virtual int getLoopInfo( deque<LoopInfo>& plist ) = 0; 01139 01146 virtual int getDmInfo( deque<DmInfo>& plist ) = 0; 01147 01154 virtual int getBtrfsInfo( deque<BtrfsInfo>& plist ) = 0; 01155 01162 virtual int getTmpfsInfo( deque<TmpfsInfo>& plist ) = 0; 01163 01171 virtual int getDmraidInfo( const string& name, 01172 deque<DmraidInfo>& plist ) = 0; 01173 01181 virtual int getDmmultipathInfo( const string& name, 01182 deque<DmmultipathInfo>& plist ) = 0; 01183 01187 virtual bool getFsCapabilities (FsType fstype, FsCapabilities& fscapabilities) const = 0; 01188 01192 virtual bool getDlabelCapabilities(const string& dlabel, 01193 DlabelCapabilities& dlabelcapabilities) const = 0; 01194 01198 virtual list<string> getAllUsedFs() const = 0; 01199 01212 virtual int createPartition( const string& disk, PartitionType type, 01213 unsigned long startCyl, 01214 unsigned long sizeCyl, 01215 string& device ) = 0; 01216 01225 virtual int resizePartition( const string& device, 01226 unsigned long sizeCyl ) = 0; 01227 01236 virtual int resizePartitionNoFs( const string& device, 01237 unsigned long sizeCyl ) = 0; 01238 01249 virtual int updatePartitionArea( const string& device, 01250 unsigned long startCyl, 01251 unsigned long sizeCyl ) = 0; 01252 01261 virtual int freeCylindersAroundPartition(const string& device, unsigned long& freeCylsBefore, 01262 unsigned long& freeCylsAfter) = 0; 01263 01273 virtual int nextFreePartition( const string& disk, PartitionType type, 01274 unsigned &nr, string& device ) = 0; 01275 01288 virtual int createPartitionKb( const string& disk, PartitionType type, 01289 unsigned long long startK, 01290 unsigned long long sizeK, 01291 string& device ) = 0; 01292 01303 virtual int createPartitionAny( const string& disk, 01304 unsigned long long sizeK, 01305 string& device ) = 0; 01306 01317 virtual int createPartitionMax( const string& disk, PartitionType type, 01318 string& device ) = 0; 01319 01327 virtual unsigned long long cylinderToKb( const string& disk, 01328 unsigned long sizeCyl) = 0; 01329 01337 virtual unsigned long kbToCylinder( const string& disk, 01338 unsigned long long sizeK) = 0; 01339 01346 virtual int removePartition (const string& partition) = 0; 01347 01355 virtual int changePartitionId (const string& partition, unsigned id) = 0; 01356 01363 virtual int forgetChangePartitionId (const string& partition ) = 0; 01364 01372 virtual string getPartitionPrefix(const string& disk) = 0; 01373 01382 virtual string getPartitionName(const string& disk, int partition_no) = 0; 01383 01391 virtual int getUnusedPartitionSlots(const string& disk, list<PartitionSlotInfo>& slots) = 0; 01392 01401 virtual int destroyPartitionTable (const string& disk, const string& label) = 0; 01402 01413 virtual int initializeDisk( const string& disk, bool value ) = 0; 01414 01423 virtual string defaultDiskLabel(const string& device) = 0; 01424 01433 virtual int changeFormatVolume( const string& device, bool format, FsType fs ) = 0; 01434 01442 virtual int changeLabelVolume( const string& device, const string& label ) = 0; 01443 01451 virtual int changeMkfsOptVolume( const string& device, const string& opts ) = 0; 01452 01460 virtual int changeTunefsOptVolume( const string& device, const string& opts ) = 0; 01461 01470 virtual int changeMountPoint( const string& device, const string& mount ) = 0; 01471 01479 virtual int getMountPoint( const string& device, string& mount ) = 0; 01480 01488 virtual int changeMountBy( const string& device, MountByType mby ) = 0; 01489 01497 #ifndef SWIG 01498 virtual int getMountBy( const string& device, MountByType& mby ) = 0; 01499 #else 01500 virtual int getMountBy( const string& device, MountByType& REFERENCE ) = 0; 01501 #endif 01502 01512 virtual int changeFstabOptions( const string& device, const string& options ) = 0; 01513 01522 virtual int getFstabOptions( const string& device, string& options ) = 0; 01523 01532 virtual int addFstabOptions( const string& device, const string& options ) = 0; 01533 01543 virtual int removeFstabOptions( const string& device, const string& options ) = 0; 01544 01552 virtual int setCryptPassword( const string& device, const string& pwd ) = 0; 01553 01560 virtual int forgetCryptPassword( const string& device ) = 0; 01561 01569 virtual int getCryptPassword( const string& device, string& pwd ) = 0; 01570 01579 virtual int verifyCryptPassword( const string& device, 01580 const string& pwd, bool erase ) = 0; 01581 01588 virtual bool needCryptPassword( const string& device ) = 0; 01589 01597 virtual int setCrypt( const string& device, bool val ) = 0; 01598 01607 virtual int setCryptType( const string& device, bool val, EncryptType typ ) = 0; 01608 01616 #ifndef SWIG 01617 virtual int getCrypt( const string& device, bool& val ) = 0; 01618 #else 01619 virtual int getCrypt( const string& device, bool& REFERENCE ) = 0; 01620 #endif 01621 01631 virtual int setIgnoreFstab( const string& device, bool val ) = 0; 01632 01640 #ifndef SWIG 01641 virtual int getIgnoreFstab( const string& device, bool& val ) = 0; 01642 #else 01643 virtual int getIgnoreFstab( const string& device, bool& REFERENCE ) = 0; 01644 #endif 01645 01655 virtual int changeDescText( const string& device, const string& txt ) = 0; 01656 01671 virtual int addFstabEntry( const string& device, const string& mount, 01672 const string& vfs, const string& options, 01673 unsigned freq, unsigned passno ) = 0; 01674 01675 01683 virtual int resizeVolume(const string& device, unsigned long long newSizeK) = 0; 01684 01692 virtual int resizeVolumeNoFs(const string& device, unsigned long long newSizeK) = 0; 01693 01700 virtual int forgetResizeVolume( const string& device ) = 0; 01701 01716 virtual void setRecursiveRemoval( bool val ) = 0; 01717 01723 virtual bool getRecursiveRemoval() const = 0; 01724 01733 virtual int getRecursiveUsing(const string& device, list<string>& devices) = 0; 01734 01744 virtual int getRecursiveUsedBy(const list<string>& devices, bool itself, 01745 list<string>& usedby_devices) = 0; 01746 01760 virtual void setZeroNewPartitions( bool val ) = 0; 01761 01767 virtual bool getZeroNewPartitions() const = 0; 01768 01780 virtual void setPartitionAlignment( PartAlign val ) = 0; 01781 01787 virtual PartAlign getPartitionAlignment() const = 0; 01788 01794 virtual void setDefaultMountBy( MountByType val ) = 0; 01795 01801 virtual MountByType getDefaultMountBy() const = 0; 01802 01808 virtual void setDefaultFs(FsType val) = 0; 01809 01815 virtual FsType getDefaultFs() const = 0; 01816 01822 virtual void setDefaultSubvolName( const string& val) = 0; 01823 01829 virtual string getDefaultSubvolName() const = 0; 01830 01836 virtual bool getEfiBoot() = 0; 01837 01848 virtual void setRootPrefix( const string& root ) = 0; 01849 01855 virtual string getRootPrefix() const = 0; 01856 01862 virtual void setDetectMountedVolumes( bool val ) = 0; 01863 01869 virtual bool getDetectMountedVolumes() const = 0; 01870 01878 virtual int removeVolume( const string& device ) = 0; 01879 01890 virtual int createLvmVg( const string& name, 01891 unsigned long long peSizeK, bool lvm1, 01892 const deque<string>& devs ) = 0; 01893 01901 virtual int removeLvmVg( const string& name ) = 0; 01902 01910 virtual int extendLvmVg( const string& name, 01911 const deque<string>& devs ) = 0; 01912 01920 virtual int shrinkLvmVg( const string& name, 01921 const deque<string>& devs ) = 0; 01922 01934 virtual int createLvmLv( const string& vg, const string& name, 01935 unsigned long long sizeK, unsigned stripes, 01936 string& device ) = 0; 01937 01944 virtual int removeLvmLvByDevice( const string& device ) = 0; 01945 01953 virtual int removeLvmLv( const string& vg, const string& name ) = 0; 01954 01964 virtual int changeLvStripeCount( const string& vg, const string& name, 01965 unsigned long stripes ) = 0; 01966 01976 virtual int changeLvStripeSize( const string& vg, const string& name, 01977 unsigned long long stripeSizeK) = 0; 01978 01989 virtual int createLvmLvSnapshot(const string& vg, const string& origin, 01990 const string& name, unsigned long long cowSizeK, 01991 string& device) = 0; 01992 02000 virtual int removeLvmLvSnapshot(const string& vg, const string& name) = 0; 02001 02012 virtual int getLvmLvSnapshotStateInfo(const string& vg, const string& name, 02013 LvmLvSnapshotStateInfo& info) = 0; 02014 02024 virtual int createLvmLvPool(const string& vg, const string& name, 02025 unsigned long long sizeK, 02026 string& device ) = 0; 02027 02038 virtual int createLvmLvThin(const string& vg, const string& name, 02039 const string& pool, 02040 unsigned long long sizeK, 02041 string& device ) = 0; 02042 02052 virtual int changeLvChunkSize( const string& vg, const string& name, 02053 unsigned long long chunkSizeK) = 0; 02054 02062 virtual int nextFreeMd(unsigned& nr, string &device) = 0; 02063 02073 virtual int createMd(const string& name, MdType md_type, const list<string>& devices, 02074 const list<string>& spares) = 0; 02075 02085 virtual int createMdAny(MdType md_type, const list<string>& devices, 02086 const list<string>& spares, string& device) = 0; 02087 02096 virtual int removeMd( const string& name, bool destroySb ) = 0; 02097 02107 virtual int extendMd(const string& name, const list<string>& devices, 02108 const list<string>& spares) = 0; 02109 02119 virtual int updateMd(const string& name, const list<string>& devices, 02120 const list<string>& spares) = 0; 02121 02131 virtual int shrinkMd(const string& name, const list<string>& devices, 02132 const list<string>& spares) = 0; 02133 02142 virtual int changeMdType(const string& name, MdType md_type) = 0; 02143 02152 virtual int changeMdChunk(const string& name, unsigned long chunkSizeK) = 0; 02153 02162 virtual int changeMdParity( const string& name, MdParity ptype ) = 0; 02163 02170 virtual int checkMd( const string& name ) = 0; 02171 02181 virtual int getMdStateInfo(const string& name, MdStateInfo& info) = 0; 02182 02192 virtual int getMdPartCoStateInfo(const string& name, 02193 MdPartCoStateInfo& info) = 0; 02194 02207 virtual int computeMdSize(MdType md_type, const list<string>& devices, 02208 const list<string>& spares, unsigned long long& sizeK) = 0; 02209 02217 virtual list<int> getMdAllowedParity(MdType md_type, unsigned devnr) = 0; 02218 02229 virtual int removeMdPartCo(const string& name, bool destroySb ) = 0; 02230 02241 virtual int addNfsDevice(const string& nfsDev, const string& opts, 02242 unsigned long long sizeK, const string& mp, 02243 bool nfs4) = 0; 02244 02254 virtual int checkNfsDevice(const string& nfsDev, const string& opts, 02255 bool nfs4, unsigned long long& sizeK) = 0; 02256 02273 virtual int createFileLoop( const string& lname, bool reuseExisting, 02274 unsigned long long sizeK, 02275 const string& mp, const string& pwd, 02276 string& device ) = 0; 02277 02295 virtual int modifyFileLoop( const string& device, const string& lname, 02296 bool reuseExisting, 02297 unsigned long long sizeK ) = 0; 02298 02307 virtual int removeFileLoop( const string& lname, bool removeFile ) = 0; 02308 02315 virtual int removeDmraid( const string& name ) = 0; 02316 02324 virtual bool existSubvolume( const string& device, const string& name ) = 0; 02325 02333 virtual int createSubvolume( const string& device, const string& name ) = 0; 02334 02342 virtual int removeSubvolume( const string& device, const string& name ) = 0; 02343 02352 virtual int extendBtrfsVolume( const string& name, 02353 const deque<string>& devs ) = 0; 02354 02363 virtual int shrinkBtrfsVolume( const string& name, 02364 const deque<string>& devs ) = 0; 02365 02373 virtual int addTmpfsMount( const string& mp, const string& opts ) = 0; 02374 02381 virtual int removeTmpfsMount( const string& mp ) = 0; 02382 02388 virtual void getCommitInfos(list<CommitInfo>& infos) const = 0; 02389 02395 virtual const string& getLastAction() const = 0; 02396 02403 virtual const string& getExtendedErrorMessage() const = 0; 02404 02405 // temporarily disable callback function for swig 02406 #ifndef SWIG 02407 02413 virtual void setCallbackProgressBar(CallbackProgressBar pfnc) = 0; 02414 02420 virtual CallbackProgressBar getCallbackProgressBar() const = 0; 02421 02422 02428 virtual void setCallbackShowInstallInfo(CallbackShowInstallInfo pfnc) = 0; 02429 02435 virtual CallbackShowInstallInfo getCallbackShowInstallInfo() const = 0; 02436 02437 02444 virtual void setCallbackInfoPopup(CallbackInfoPopup pfnc) = 0; 02445 02452 virtual CallbackInfoPopup getCallbackInfoPopup() const = 0; 02453 02454 02461 virtual void setCallbackYesNoPopup(CallbackYesNoPopup pfnc) = 0; 02462 02469 virtual CallbackYesNoPopup getCallbackYesNoPopup() const = 0; 02470 02471 02477 virtual void setCallbackCommitErrorPopup(CallbackCommitErrorPopup pfnc) = 0; 02478 02484 virtual CallbackCommitErrorPopup getCallbackCommitErrorPopup() const = 0; 02485 02486 02492 virtual void setCallbackPasswordPopup(CallbackPasswordPopup pfnc) = 0; 02493 02500 virtual CallbackPasswordPopup getCallbackPasswordPopup() const = 0; 02501 02502 #endif 02503 02509 virtual void setCacheChanges (bool cache) = 0; 02510 02514 virtual bool isCacheChanges () const = 0; 02515 02520 virtual int commit() = 0; 02521 02525 virtual string getErrorString(int error) const = 0; 02526 02533 virtual int createBackupState( const string& name ) = 0; 02534 02541 virtual int restoreBackupState( const string& name ) = 0; 02542 02549 virtual bool checkBackupState(const string& name) const = 0; 02550 02559 virtual bool equalBackupStates(const string& lhs, const string& rhs, 02560 bool verbose_log) const = 0; 02561 02569 virtual int removeBackupState( const string& name ) = 0; 02570 02578 virtual bool checkDeviceMounted(const string& device, list<string>& mps) = 0; 02579 02590 virtual bool umountDevice( const string& device ) = 0; 02591 02604 virtual bool umountDeviceUns( const string& device, bool unsetup ) = 0; 02605 02616 virtual bool mountDevice( const string& device, const string& mp ) = 0; 02617 02628 virtual int activateEncryption( const string& device, bool on ) = 0; 02629 02641 virtual bool mountDeviceOpts( const string& device, const string& mp, 02642 const string& opts ) = 0; 02643 02655 virtual bool mountDeviceRo( const string& device, const string& mp, 02656 const string& opts ) = 0; 02657 02664 virtual bool checkDmMapsTo( const string& device ) = 0; 02665 02671 virtual void removeDmTableTo( const string& device ) = 0; 02672 02684 virtual bool getFreeInfo(const string& device, bool get_resize, ResizeInfo& resize_info, 02685 bool get_content, ContentInfo& content_info, bool use_cache) = 0; 02686 02694 virtual bool readFstab( const string& dir, deque<VolumeInfo>& infos) = 0; 02695 02705 virtual void activateHld( bool val ) = 0; 02706 02715 virtual void activateMultipath( bool val ) = 0; 02716 02725 virtual void rescanEverything() = 0; 02726 02735 virtual bool rescanCryptedObjects() = 0; 02736 02740 virtual void dumpObjectList() = 0; 02741 02745 virtual void dumpCommitInfos() const = 0; 02746 02756 virtual int getContVolInfo(const string& dev, ContVolInfo& info) = 0; 02757 02758 }; 02759 02760 02766 list<string> getPresentDisks(); 02767 02771 void initDefaultLogger(); 02772 02773 02777 struct Environment 02778 { 02779 Environment(bool readonly) : readonly(readonly), testmode(false), autodetect(true), 02780 instsys(false), logdir("/var/log/YaST2"), testdir("tmp") {} 02781 02782 bool readonly; 02783 bool testmode; 02784 bool autodetect; 02785 bool instsys; 02786 string logdir; 02787 string testdir; 02788 }; 02789 02790 02796 StorageInterface* createStorageInterface(const Environment& env); 02797 02798 02806 StorageInterface* createStorageInterfacePid(const Environment& env, int& locker_pid); 02807 02808 02812 void destroyStorageInterface(StorageInterface*); 02813 02814 } 02815 02816 02817 #endif
1.7.3