Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49603 - /trunk/storage/storage/src/modules/Partitions.ycp
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Sun, 03 Aug 2008 11:17:13 -0000
  • Message-id: <20080803111713.92D572BF1D@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Sun Aug 3 13:17:13 2008
New Revision: 49603

URL: http://svn.opensuse.org/viewcvs/yast?rev=49603&view=rev
Log:
- use switch statement

Modified:
trunk/storage/storage/src/modules/Partitions.ycp

Modified: trunk/storage/storage/src/modules/Partitions.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Partitions.ycp?rev=49603&r1=49602&r2=49603&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Partitions.ycp (original)
+++ trunk/storage/storage/src/modules/Partitions.ycp Sun Aug 3 13:17:13 2008
@@ -1,9 +1,10 @@
/**
- * Module: Partitions.ycp
+ * Module: Partitions.ycp
*
- * Authors: Thomas Fehr (fehr@xxxxxxx)
+ * Authors: Thomas Fehr <fehr@xxxxxxx>
+ * Arvin Schnell <aschnell@xxxxxxx>
*
- * Purpose: Provides information about partitions
+ * Purpose: Provides information about partitions
*
* $Id$
*/
@@ -18,33 +19,35 @@
import "AsciiFile";
import "String";

+
// The filesystem ids for the partitions
- global integer fsid_empty = 0;
- global integer fsid_native = 131;
- global integer fsid_swap = 130;
- global integer fsid_lvm = 142;
- global integer fsid_raid = 253;
- global integer fsid_hibernation = 160;
- global integer fsid_extended = 5;
- global integer fsid_extended_win = 15;
- global integer fsid_fat16 = 6;
- global integer fsid_fat32 = 12;
- global integer fsid_prep_chrp_boot = 0x41;
- global integer fsid_mac_hidden = 0x101;
- global integer fsid_mac_hfs = 0x102;
- global integer fsid_mac_ufs = 0x106;
- global integer fsid_gpt_boot = 0x103;
- global integer fsid_gpt_service = 0x104;
- global integer fsid_gpt_msftres = 0x105;
- global integer fsid_freebsd = 0xa5;
- global integer fsid_openbsd = 0xa6;
- global integer fsid_netbsd = 0xa9;
- global integer fsid_beos = 0xeb;
- global integer fsid_solaris = 0xbf;
- global integer fsid_root = fsid_native;
- integer fsid_boot = 0;
- integer boot_cyl = 0;
- string boot_mount_point = "";
+ global const integer fsid_empty = 0;
+ global const integer fsid_native = 131;
+ global const integer fsid_swap = 130;
+ global const integer fsid_lvm = 142;
+ global const integer fsid_raid = 253;
+ global const integer fsid_hibernation = 160;
+ global const integer fsid_extended = 5;
+ global const integer fsid_extended_win = 15;
+ global const integer fsid_fat16 = 6;
+ global const integer fsid_fat32 = 12;
+ global const integer fsid_prep_chrp_boot = 0x41;
+ global const integer fsid_mac_hidden = 0x101;
+ global const integer fsid_mac_hfs = 0x102;
+ global const integer fsid_mac_ufs = 0x106;
+ global const integer fsid_gpt_boot = 0x103;
+ global const integer fsid_gpt_service = 0x104;
+ global const integer fsid_gpt_msftres = 0x105;
+ global const integer fsid_freebsd = 0xa5;
+ global const integer fsid_openbsd = 0xa6;
+ global const integer fsid_netbsd = 0xa9;
+ global const integer fsid_beos = 0xeb;
+ global const integer fsid_solaris = 0xbf;
+ global const integer fsid_root = fsid_native;
+
+ integer fsid_boot = 0;
+ integer boot_cyl = 0;
+ string boot_mount_point = "";

global boolean no_fsid_menu = Arch::s390 ();

@@ -582,101 +585,106 @@
return( ret );
}

-global define string FsIdToString( integer fs_id )
- ``{
- if ( fs_id == 0xa7) return( "NeXTSTEP");
- if ( fs_id == 0xb7) return( "BSDI fs");
- if ( fs_id == 0xb8) return( "BSDI swap");
- if ( fs_id == 0xc1) return( "DRDOS/sec");
- if ( fs_id == 0xc4) return( "DRDOS/sec");
- if ( fs_id == 0xc6) return( "DRDOS/sec");
- if ( fs_id == 0xc7) return( "Syrinx");
- if ( fs_id == 0xda) return( "Non-Fs data");
- if ( fs_id == 0xdb) return( "CP/M / CTOS");
- if ( fs_id == 0xde) return( "Dell Utility");
- if ( fs_id == 0xe1) return( "DOS access");
- if ( fs_id == 0xe3) return( "DOS R/O");
- if ( fs_id == 0xe4) return( "SpeedStor");
- if ( fs_id == 0xeb) return( "BeOS fs");
- if ( fs_id == 0xee) return( "EFI GPT");
- if ( fs_id == 0xef) return( "EFI (FAT-12/16)");
- if ( fs_id == 0xf1) return( "SpeedStor");
- if ( fs_id == 0xf4) return( "SpeedStor");
- if ( fs_id == 0xf2) return( "DOS secondary ");
- if ( fs_id == 0xfd) return( "Linux RAID");
- if ( fs_id == 0xfe) return( "LANstep");
- if ( fs_id == 0xff) return( "BBT or NBO reserved");
- if ( fs_id == 0x0) return( "empty");
- if ( fs_id == 0x1) return( "FAT12");
- if ( fs_id == 0x2) return( "XENIX root");
- if ( fs_id == 0x3) return( "XENIX usr");
- if ( fs_id == 0x4) return( "FAT16 <32M");
- if ( fs_id == 0x5) return( "Extended");
- if ( fs_id == 0x6) return( "FAT16");
- if ( fs_id == 0x7) return( "HPFS/NTFS");
- if ( fs_id == 0x8) return( "AIX");
- if ( fs_id == 0x9) return( "AIX boot");
- if ( fs_id == 0xa) return( "OS/2 boot manager");
- if ( fs_id == 0xb) return( "Win95 FAT32");
- if ( fs_id == 0xc) return( "Win95 FAT32 LBA");
- if ( fs_id == 0xe) return( "Win95 FAT16");
- if ( fs_id == 0xf) return( "Extended");
- if ( fs_id == 0x10) return( "OPUS");
- if ( fs_id == 0x11) return( "Hidden FAT12");
- if ( fs_id == 0x12) return( "Vendor diag");
- if ( fs_id == 0x14) return( "Hidden FAT16");
- if ( fs_id == 0x16) return( "Hidden FAT16");
- if ( fs_id == 0x17) return( "Hidden HPFS/NTFS");
- if ( fs_id == 0x18) return( "AST Windows");
- if ( fs_id == 0x1b) return( "Hidden Win95");
- if ( fs_id == 0x1c) return( "Hidden Win95");
- if ( fs_id == 0x1e) return( "Hidden Win95");
- if ( fs_id == 0x24) return( "NEC DOS");
- if ( fs_id == 0x39) return( "Plan 9");
- if ( fs_id == 0x3c) return( "PartitionMagic");
- if ( fs_id == 0x40) return( "Venix 80286");
- if ( fs_id == 0x41) return( "PPC PReP Boot");
- if ( fs_id == 0x42) return( "SFS");
- if ( fs_id == 0x4d) return( "QNX4.x");
- if ( fs_id == 0x4e) return( "QNX4.x 2nd par");
- if ( fs_id == 0x4f) return( "QNX4.x 3rd par");
- if ( fs_id == 0x50) return( "OnTrack DM");
- if ( fs_id == 0x51) return( "OnTrack DM6");
- if ( fs_id == 0x52) return( "CP/M");
- if ( fs_id == 0x53) return( "OnTrack DM6");
- if ( fs_id == 0x54) return( "OnTrack DM6");
- if ( fs_id == 0x55) return( "EZ-Drive");
- if ( fs_id == 0x56) return( "Golden Bow");
- if ( fs_id == 0x5c) return( "Priam Edisk");
- if ( fs_id == 0x61) return( "SpeedStor");
- if ( fs_id == 0x63) return( "GNU HURD");
- if ( fs_id == 0x64) return( "Novell NetWare");
- if ( fs_id == 0x65) return( "Novell NetWare");
- if ( fs_id == 0x70) return( "DiskSecure");
- if ( fs_id == 0x75) return( "PC/IX");
- if ( fs_id == 0x80) return( "Old Minix");
- if ( fs_id == 0x81) return( "Minix");
- if ( fs_id == 0x82) return( "Linux swap");
- if ( fs_id == 0x83) return( "Linux native");
- if ( fs_id == 0x84) return( "OS/2 hidden");
- if ( fs_id == 0x85) return( "Linux extended");
- if ( fs_id == 0x86) return( "NTFS volume");
- if ( fs_id == 0x87) return( "NTFS volume");
- if ( fs_id == 0x8e) return( "Linux LVM");
- if ( fs_id == 0x93) return( "Amoeba");
- if ( fs_id == 0x94) return( "Amoeba BBT");
- if ( fs_id == 0x9f) return( "BSD/OS");
- if ( fs_id == 0xa0) return( "Hibernation");
- if ( fs_id == 0xa5) return( "FreeBSD");
- if ( fs_id == 0xa6) return( "OpenBSD");
- if ( fs_id == 0xa9) return( "NetBSD");
- if ( fs_id == 0x102) return( "Apple_HFS");
- if ( fs_id == 0x103) return( "EFI boot");
- if ( fs_id == 0x104) return( "Service");
- if ( fs_id == 0x105) return( "Microsoft reserved");
- if ( fs_id == 0x106) return( "Apple_UFS");
- return( "unknown" );
- };
+
+global string FsIdToString(integer fs_id)
+{
+ switch (fs_id)
+ {
+ case 0x0: return "empty";
+ case 0x1: return "FAT12";
+ case 0x2: return "XENIX root";
+ case 0x3: return "XENIX usr";
+ case 0x4: return "FAT16 <32M";
+ case 0x5: return "Extended";
+ case 0x6: return "FAT16";
+ case 0x7: return "HPFS/NTFS";
+ case 0x8: return "AIX";
+ case 0x9: return "AIX boot";
+ case 0xa: return "OS/2 boot manager";
+ case 0xb: return "Win95 FAT32";
+ case 0xc: return "Win95 FAT32 LBA";
+ case 0xe: return "Win95 FAT16";
+ case 0xf: return "Extended";
+ case 0xa7: return "NeXTSTEP";
+ case 0xb7: return "BSDI fs";
+ case 0xb8: return "BSDI swap";
+ case 0xc1: return "DRDOS/sec";
+ case 0xc4: return "DRDOS/sec";
+ case 0xc6: return "DRDOS/sec";
+ case 0xc7: return "Syrinx";
+ case 0xda: return "Non-Fs data";
+ case 0xdb: return "CP/M / CTOS";
+ case 0xde: return "Dell Utility";
+ case 0xe1: return "DOS access";
+ case 0xe3: return "DOS R/O";
+ case 0xe4: return "SpeedStor";
+ case 0xeb: return "BeOS fs";
+ case 0xee: return "EFI GPT";
+ case 0xef: return "EFI (FAT-12/16)";
+ case 0xf1: return "SpeedStor";
+ case 0xf4: return "SpeedStor";
+ case 0xf2: return "DOS secondary";
+ case 0xfd: return "Linux RAID";
+ case 0xfe: return "LANstep";
+ case 0xff: return "BBT or NBO reserved";
+ case 0x10: return "OPUS";
+ case 0x11: return "Hidden FAT12";
+ case 0x12: return "Vendor diag";
+ case 0x14: return "Hidden FAT16";
+ case 0x16: return "Hidden FAT16";
+ case 0x17: return "Hidden HPFS/NTFS";
+ case 0x18: return "AST Windows";
+ case 0x1b: return "Hidden Win95";
+ case 0x1c: return "Hidden Win95";
+ case 0x1e: return "Hidden Win95";
+ case 0x24: return "NEC DOS";
+ case 0x39: return "Plan 9";
+ case 0x3c: return "PartitionMagic";
+ case 0x40: return "Venix 80286";
+ case 0x41: return "PPC PReP Boot";
+ case 0x42: return "SFS";
+ case 0x4d: return "QNX4.x";
+ case 0x4e: return "QNX4.x 2nd par";
+ case 0x4f: return "QNX4.x 3rd par";
+ case 0x50: return "OnTrack DM";
+ case 0x51: return "OnTrack DM6";
+ case 0x52: return "CP/M";
+ case 0x53: return "OnTrack DM6";
+ case 0x54: return "OnTrack DM6";
+ case 0x55: return "EZ-Drive";
+ case 0x56: return "Golden Bow";
+ case 0x5c: return "Priam Edisk";
+ case 0x61: return "SpeedStor";
+ case 0x63: return "GNU HURD";
+ case 0x64: return "Novell NetWare";
+ case 0x65: return "Novell NetWare";
+ case 0x70: return "DiskSecure";
+ case 0x75: return "PC/IX";
+ case 0x80: return "Old Minix";
+ case 0x81: return "Minix";
+ case 0x82: return "Linux swap";
+ case 0x83: return "Linux native";
+ case 0x84: return "OS/2 hidden";
+ case 0x85: return "Linux extended";
+ case 0x86: return "NTFS volume";
+ case 0x87: return "NTFS volume";
+ case 0x8e: return "Linux LVM";
+ case 0x93: return "Amoeba";
+ case 0x94: return "Amoeba BBT";
+ case 0x9f: return "BSD/OS";
+ case 0xa0: return "Hibernation";
+ case 0xa5: return "FreeBSD";
+ case 0xa6: return "OpenBSD";
+ case 0xa9: return "NetBSD";
+ case 0x102: return "Apple_HFS";
+ case 0x103: return "EFI boot";
+ case 0x104: return "Service";
+ case 0x105: return "Microsoft reserved";
+ case 0x106: return "Apple_UFS";
+ default: return "unknown";
+ }
+}
+

map capabilities = $[ "msdos" : $[ "extended" : true,
"max_primary" : 4 ],

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages