summaryrefslogtreecommitdiffstats
path: root/perl-install/install/share
diff options
context:
space:
mode:
authorMashrab Kuvatov <kmashrab@mandriva.org>2008-08-25 19:30:24 +0000
committerMashrab Kuvatov <kmashrab@mandriva.org>2008-08-25 19:30:24 +0000
commit0dcf55cddc038d5c7f7795841699e86c138cdfe4 (patch)
tree7d3bdf17a36cf1599cbab839cd5c75d6dd6a5f80 /perl-install/install/share
parentfc5acb415df5db320863ce8733d8a9300ea28eed (diff)
downloaddrakx-0dcf55cddc038d5c7f7795841699e86c138cdfe4.tar
drakx-0dcf55cddc038d5c7f7795841699e86c138cdfe4.tar.gz
drakx-0dcf55cddc038d5c7f7795841699e86c138cdfe4.tar.bz2
drakx-0dcf55cddc038d5c7f7795841699e86c138cdfe4.tar.xz
drakx-0dcf55cddc038d5c7f7795841699e86c138cdfe4.zip
New translations.
Diffstat (limited to 'perl-install/install/share')
-rw-r--r--perl-install/install/share/po/uz.po78
-rw-r--r--perl-install/install/share/po/uz@cyrillic.po42
2 files changed, 52 insertions, 68 deletions
diff --git a/perl-install/install/share/po/uz.po b/perl-install/install/share/po/uz.po
index 6e7ff2b57..e40d38286 100644
--- a/perl-install/install/share/po/uz.po
+++ b/perl-install/install/share/po/uz.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: uz@cyrillic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-18 18:03+0200\n"
-"PO-Revision-Date: 2008-03-28 23:58+0100\n"
+"PO-Revision-Date: 2008-08-24 01:06+0200\n"
"Last-Translator: Mashrab Kuvatov <kmashrab@uni-bremen.de>\n"
"Language-Team: Uzbek <floss-uz-l10n@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -70,8 +70,7 @@ msgstr "Manzil ftp:// yoki http:// bilan boshlanishi kerak"
#: any.pm:180
#, c-format
-msgid ""
-"Contacting Mandriva Linux web site to get the list of available mirrors..."
+msgid "Contacting Mandriva Linux web site to get the list of available mirrors..."
msgstr ""
"Mavjud boʻlgan oynalarning roʻyxatini olish uchun Mandriva Linux sayti bilan "
"aloqa oʻrnatilmoqda..."
@@ -256,8 +255,7 @@ msgstr "Skrinshotlarni diskni boʻlishdan avval olib boʻlmaydi"
#: any.pm:1230
#, c-format
msgid "Screenshots will be available after install in %s"
-msgstr ""
-"Oʻrnatish tugaganidan keyin skrinshotlarni quyidagi joydan topish mumkin: %s"
+msgstr "Oʻrnatish tugaganidan keyin skrinshotlarni quyidagi joydan topish mumkin: %s"
#: gtk.pm:126
#, c-format
@@ -339,6 +337,8 @@ msgid ""
"Some packages requested by %s cannot be installed:\n"
"%s"
msgstr ""
+"%s talab qiladigan baʼzi paketlarni oʻrnatib boʻlmaydi:\n"
+"%s"
#: share/meta-task/compssUsers.pl:11
#, c-format
@@ -399,8 +399,8 @@ msgid ""
"Set of tools to read and send mail and news (mutt, tin..) and to browse the "
"Web"
msgstr ""
-"Xat-xabar, yangiliklarni oʻqish va joʻnatish (mutt, tin..) va Internetda "
-"sayr qilish uchun vositalar toʻplami"
+"Xat-xabar, yangiliklarni oʻqish va joʻnatish (mutt, tin..) va Internetda sayr "
+"qilish uchun vositalar toʻplami"
#: share/meta-task/compssUsers.pl:37
#, c-format
@@ -606,8 +606,8 @@ msgid ""
"A graphical environment with user-friendly set of applications and desktop "
"tools"
msgstr ""
-"Foydalanuvchilar uchun qulay dasturlar va ish stoli vositalaridan iborat "
-"grafik muhit"
+"Foydalanuvchilar uchun qulay dasturlar va ish stoli vositalaridan iborat grafik "
+"muhit"
#: share/meta-task/compssUsers.pl:142
#, c-format
@@ -652,8 +652,7 @@ msgstr "Tarmoq vositalari/Nazorat qilish"
#: share/meta-task/compssUsers.pl:183
#, c-format
msgid "Monitoring tools, processes accounting, tcpdump, nmap, ..."
-msgstr ""
-"Nazorat qilish vositalari, vazifalar hisobotchilari, tcpdump, nmap, ..."
+msgstr "Nazorat qilish vositalari, vazifalar hisobotchilari, tcpdump, nmap, ..."
#: share/meta-task/compssUsers.pl:187
#, c-format
@@ -682,8 +681,8 @@ msgid ""
msgstr ""
"Baʼzi bir muhim paketlar toʻgʻri oʻrnatilmadi.\n"
"Sizning kompakt-disk uskunangizda yoki kompakt-diskingizda xato bor.\n"
-"Kompakt-diskni oʻrnatilgan kompyuterda \"rpm -qpl media/main/*.rpm\" "
-"buyrugʻi bilan tekshirib koʻring.\n"
+"Kompakt-diskni oʻrnatilgan kompyuterda \"rpm -qpl media/main/*.rpm\" buyrugʻi "
+"bilan tekshirib koʻring.\n"
#: steps_auto_install.pm:71 steps_stdio.pm:27
#, c-format
@@ -703,7 +702,7 @@ msgstr "<Tab>/<Alt-Tab> banddan-bandga"
#: steps_gtk.pm:84
#, c-format
msgid "Xorg server is slow to start. Please wait..."
-msgstr ""
+msgstr "Xorg dasturi juda sekin ishga tushyapti. Iltimos kutib turing..."
#: steps_gtk.pm:194
#, c-format
@@ -737,7 +736,7 @@ msgstr ""
#: steps_gtk.pm:275
#, c-format
msgid "Click on images in order to see a bigger preview"
-msgstr ""
+msgstr "Ish stolini yaqinroqdan koʻrish uchun rasmni sichqoncha bilan bosing"
#: steps_gtk.pm:287 steps_interactive.pm:618 steps_list.pm:30
#, c-format
@@ -809,8 +808,7 @@ msgstr "%s'ni qoldirish uchun"
msgid ""
"You can not select this package as there is not enough space left to install "
"it"
-msgstr ""
-"Bu paketni tanlolmaysiz, chunki uni oʻrnatish uchun yetarli joy mavjud emas."
+msgstr "Bu paketni tanlolmaysiz, chunki uni oʻrnatish uchun yetarli joy mavjud emas."
#: steps_gtk.pm:428
#, c-format
@@ -825,8 +823,7 @@ msgstr "Quyidagi paketlar olib tashlaniladi."
#: steps_gtk.pm:454
#, c-format
msgid "This is a mandatory package, it can not be unselected"
-msgstr ""
-"Bu oʻrnatilishi shart boʻlgan paket, uni tanlashni bekor qilib boʻlmaydi."
+msgstr "Bu oʻrnatilishi shart boʻlgan paket, uni tanlashni bekor qilib boʻlmaydi."
#: steps_gtk.pm:456
#, c-format
@@ -931,8 +928,8 @@ msgid ""
"It will then continue from the hard drive and the packages will remain "
"available once the system is fully installed."
msgstr ""
-"Oʻrnatishdan avval kompakt-disklardagi paketlardan kompyuterning diskiga "
-"nusxa olish mumkin.\n"
+"Oʻrnatishdan avval kompakt-disklardagi paketlardan kompyuterning diskiga nusxa "
+"olish mumkin.\n"
"Oʻrnatish toʻliq tugagandan soʻng ular tizimga maʼlum boʻladi."
#: steps_gtk.pm:702 steps_interactive.pm:339
@@ -995,10 +992,10 @@ msgstr "%s uchun kodlash kaliti"
#: steps_interactive.pm:199
#, c-format
msgid "Cancel installation, reboot system"
-msgstr ""
+msgstr "Oʻrnatishni bekor qilish, kompyuterni oʻchirib-yoqish"
#: steps_interactive.pm:200
-#, fuzzy, c-format
+#, c-format
msgid "New Installation"
msgstr "Oʻrnatish"
@@ -1055,8 +1052,8 @@ msgstr ""
"Kompakt-diskni almashtiring!\n"
"\n"
"Iltimos '%s' belgili kompakt-diskni qoʻying va \"Ok\" tugmasini bosing.\n"
-"Agar u sizda boʻlmasa, bu kompakt-diskdan oʻrnatishni bekor qilish uchun "
-"\"Bekor qilish\" tugmasini bosing."
+"Agar u sizda boʻlmasa, bu kompakt-diskdan oʻrnatishni bekor qilish uchun \"Bekor "
+"qilish\" tugmasini bosing."
#: steps_interactive.pm:403
#, c-format
@@ -1068,8 +1065,7 @@ msgstr "Mavjud boʻlgan paketlar qidirilmoqda..."
msgid ""
"Your system does not have enough space left for installation or upgrade (%"
"dMB > %dMB)"
-msgstr ""
-"Tizimda oʻrnatish yoki yangilash uchun yetarli joy qolmadi (%d Mb > %d Mb)"
+msgstr "Tizimda oʻrnatish yoki yangilash uchun yetarli joy qolmadi (%d Mb > %d Mb)"
#: steps_interactive.pm:459
#, c-format
@@ -1094,24 +1090,24 @@ msgid "Bad file"
msgstr "Notoʻgʻri fayl"
#: steps_interactive.pm:485
-#, fuzzy, c-format
+#, c-format
msgid "KDE"
-msgstr "IDE"
+msgstr "KDE"
#: steps_interactive.pm:486
#, c-format
msgid "GNOME"
-msgstr ""
+msgstr "GNOME"
#: steps_interactive.pm:489
-#, fuzzy, c-format
+#, c-format
msgid "Desktop Selection"
-msgstr "Paketlarni guruh boʻyicha tanlash"
+msgstr "Ish stolini tanlash"
#: steps_interactive.pm:490
-#, fuzzy, c-format
+#, c-format
msgid "You can choose your workstation desktop profile:"
-msgstr "Quyidagi roʻyxatdan oʻrnatiladigan dasturlar guruhini tanlang"
+msgstr "Quyidagilardan oʻrnatiladigan ish stolini tanlang"
#: steps_interactive.pm:575
#, c-format
@@ -1224,8 +1220,7 @@ msgstr ""
"yangilangan. Ularda har xil xavfsizlik va dasturlar bilan bogʻliq\n"
"xatoliklar tuzatilgan boʻlishi mumkin.\n"
"\n"
-"Bu paketlarni yozib olish uchun sizda Internet bilan aloqa oʻrnatilgan "
-"boʻlishi\n"
+"Bu paketlarni yozib olish uchun sizda Internet bilan aloqa oʻrnatilgan boʻlishi\n"
"kerak.\n"
"\n"
"Yangilanishlarni oʻrnatishni istaysizmi?"
@@ -1269,8 +1264,8 @@ msgid ""
"Run \"alsaconf\" or \"sndconfig\" after installation to configure your sound "
"card"
msgstr ""
-"Oʻrnatishdan keyin, tovush kartangizni moslash uchun, \"sndconfig\" yoki "
-"\"alsaconf\" dasturini ishga tushiring"
+"Oʻrnatishdan keyin, tovush kartangizni moslash uchun, \"sndconfig\" yoki \"alsaconf"
+"\" dasturini ishga tushiring"
#: steps_interactive.pm:957
#, c-format
@@ -1431,7 +1426,7 @@ msgstr "Til"
#: steps_list.pm:16 steps_list.pm:23
#, c-format
msgid "Localization"
-msgstr ""
+msgstr "Mahalliylashtirish"
#: steps_list.pm:17
#, c-format
@@ -1584,8 +1579,3 @@ msgstr ""
msgid "Mandriva: distributions for everybody's needs"
msgstr ""
-#~ msgid "All"
-#~ msgstr "Hammasi"
-
-#~ msgid "TV card"
-#~ msgstr "TV karta"
diff --git a/perl-install/install/share/po/uz@cyrillic.po b/perl-install/install/share/po/uz@cyrillic.po
index be47f34b3..8b54057e1 100644
--- a/perl-install/install/share/po/uz@cyrillic.po
+++ b/perl-install/install/share/po/uz@cyrillic.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: uz@cyrillic\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-18 18:03+0200\n"
-"PO-Revision-Date: 2008-03-28 23:58+0100\n"
+"PO-Revision-Date: 2008-08-24 01:06+0200\n"
"Last-Translator: Mashrab Kuvatov <kmashrab@uni-bremen.de>\n"
"Language-Team: Uzbek <floss-uz-l10n@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -70,8 +70,7 @@ msgstr "Манзил ftp:// ёки http:// билан бошланиши кер
#: any.pm:180
#, c-format
-msgid ""
-"Contacting Mandriva Linux web site to get the list of available mirrors..."
+msgid "Contacting Mandriva Linux web site to get the list of available mirrors..."
msgstr ""
"Мавжуд бўлган ойналарнинг рўйхатини олиш учун Mandriva Linux сайти билан "
"алоқа ўрнатилмоқда..."
@@ -256,8 +255,7 @@ msgstr "Скриншотларни дискни бўлишдан аввал ол
#: any.pm:1230
#, c-format
msgid "Screenshots will be available after install in %s"
-msgstr ""
-"Ўрнатиш тугаганидан кейин скриншотларни қуйидаги жойдан топиш мумкин: %s"
+msgstr "Ўрнатиш тугаганидан кейин скриншотларни қуйидаги жойдан топиш мумкин: %s"
#: gtk.pm:126
#, c-format
@@ -339,6 +337,8 @@ msgid ""
"Some packages requested by %s cannot be installed:\n"
"%s"
msgstr ""
+"%s талаб қиладиган баъзи пакетларни ўрнатиб бўлмайди:\n"
+"%s"
#: share/meta-task/compssUsers.pl:11
#, c-format
@@ -702,7 +702,7 @@ msgstr "<Tab>/<Alt-Tab> банддан-бандга"
#: steps_gtk.pm:84
#, c-format
msgid "Xorg server is slow to start. Please wait..."
-msgstr ""
+msgstr "Xorg дастури жуда секин ишга тушяпти. Илтимос кутиб туринг..."
#: steps_gtk.pm:194
#, c-format
@@ -736,7 +736,7 @@ msgstr ""
#: steps_gtk.pm:275
#, c-format
msgid "Click on images in order to see a bigger preview"
-msgstr ""
+msgstr "Иш столини яқинроқдан кўриш учун расмни сичқонча билан босинг"
#: steps_gtk.pm:287 steps_interactive.pm:618 steps_list.pm:30
#, c-format
@@ -808,8 +808,7 @@ msgstr "%s'ни қолдириш учун"
msgid ""
"You can not select this package as there is not enough space left to install "
"it"
-msgstr ""
-"Бу пакетни танлолмайсиз, чунки уни ўрнатиш учун етарли жой мавжуд эмас."
+msgstr "Бу пакетни танлолмайсиз, чунки уни ўрнатиш учун етарли жой мавжуд эмас."
#: steps_gtk.pm:428
#, c-format
@@ -993,10 +992,10 @@ msgstr "%s учун кодлаш калити"
#: steps_interactive.pm:199
#, c-format
msgid "Cancel installation, reboot system"
-msgstr ""
+msgstr "Ўрнатишни бекор қилиш, компьютерни ўчириб-ёқиш"
#: steps_interactive.pm:200
-#, fuzzy, c-format
+#, c-format
msgid "New Installation"
msgstr "Ўрнатиш"
@@ -1091,24 +1090,24 @@ msgid "Bad file"
msgstr "Нотўғри файл"
#: steps_interactive.pm:485
-#, fuzzy, c-format
+#, c-format
msgid "KDE"
-msgstr "IDE"
+msgstr "KDE"
#: steps_interactive.pm:486
#, c-format
msgid "GNOME"
-msgstr ""
+msgstr "GNOME"
#: steps_interactive.pm:489
-#, fuzzy, c-format
+#, c-format
msgid "Desktop Selection"
-msgstr "Пакетларни гуруҳ бўйича танлаш"
+msgstr "Иш столини танлаш"
#: steps_interactive.pm:490
-#, fuzzy, c-format
+#, c-format
msgid "You can choose your workstation desktop profile:"
-msgstr "Қуйидаги рўйхатдан ўрнатиладиган дастурлар гуруҳини танланг"
+msgstr "Қуйидагилардан ўрнатиладиган иш столини танланг"
#: steps_interactive.pm:575
#, c-format
@@ -1427,7 +1426,7 @@ msgstr "Тил"
#: steps_list.pm:16 steps_list.pm:23
#, c-format
msgid "Localization"
-msgstr ""
+msgstr "Маҳаллийлаштириш"
#: steps_list.pm:17
#, c-format
@@ -1580,8 +1579,3 @@ msgstr ""
msgid "Mandriva: distributions for everybody's needs"
msgstr ""
-#~ msgid "All"
-#~ msgstr "Ҳаммаси"
-
-#~ msgid "TV card"
-#~ msgstr "ТВ карта"
' href='#n787'>787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
package detect_devices; # $Id$

use diagnostics;
use strict;
use vars qw($pcitable_addons $usbtable_addons);

#-######################################################################################
#- misc imports
#-######################################################################################
use log;
use MDK::Common; # help perl_checker
use common;
use devices;
use run_program;
use modules;
use c;
use feature 'state';

#-#####################################################################################
#- Globals
#-#####################################################################################
my %serialprobe;

#-######################################################################################
#- Functions
#-######################################################################################

sub get() {
    #- Detect the default BIOS boot harddrive is kind of tricky. We may have IDE,
    #- SCSI and RAID devices on the same machine. From what I see so far, the default
    #- BIOS boot harddrive will be
    #- 1. The first IDE device if IDE exists. Or
    #- 2. The first SCSI device if SCSI exists. Or
    #- 3. The first RAID device if RAID exists.

    getIDE(), getSCSI(), getVirtIO(), getDAC960(), getCompaqSmartArray(), getATARAID();
}
sub hds()         { grep { may_be_a_hd($_) } get() }
sub tapes()       { grep { $_->{media_type} eq 'tape' } get() }
sub cdroms()      { grep { $_->{media_type} eq 'cdrom' } get() }
sub burners()     { grep { isBurner($_) } cdroms() }
sub dvdroms()     { grep { isDvdDrive($_) } cdroms() }
sub raw_zips()    { grep { member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get() }
sub ls120s()      { grep { member($_->{media_type}, 'fd', 'hd') && isLS120Drive($_) } get() }
sub zips()        {
    map { 
	$_->{device} .= 4; 
	$_;
    } raw_zips();
}

sub floppies {
    my ($o_not_detect_legacy_floppies) = @_;
    require modules;
    state @fds;
    state $legacy_already_detected;
    if (!$o_not_detect_legacy_floppies && !$legacy_already_detected) {
        $legacy_already_detected = 1;
        eval { modules::load("floppy") if $::isInstall };
        #- do not bother probing /dev/fd0 and loading floppy device uselessly,
        #- it takes time and it is already done by boot process (if not in install):
        #-   /dev/fd0 is created by start_udev (/etc/udev/devices.d/default.nodes)
        #-   then hal probes /dev/fd0 and triggers floppy module loading through kernel's kmod
        if (any { (split)[1] eq 'fd' } cat_("/proc/devices")) {
            @fds = map {
                my $info = c::floppy_info(devices::make("fd$_"));
                if_($info && $info ne '(null)', { device => "fd$_", media_type => 'fd', info => $info });
            } qw(0 1);
        }
    }
        
    my @ide = ls120s() and eval { modules::load("ide_floppy") };

    eval { modules::load("usb_storage") } if $::isInstall && usbStorage();
    my @scsi = grep { $_->{media_type} eq 'fd' } getSCSI();
    @ide, @scsi, @fds;
}
sub floppies_dev() { map { $_->{device} } floppies() }
sub floppy() { first(floppies_dev()) }
#- example ls120, model = "LS-120 SLIM 02 UHD Floppy"

sub removables() {
    floppies(), cdroms(), zips();
}

sub get_sys_cdrom_info {
    my (@drives) = @_;

    my @drives_order;
    foreach (cat_("/proc/sys/dev/cdrom/info")) {
	my ($t, $l) = split ':';
	my @l;
	@l = split(' ', $l) if $l;
	if ($t eq 'drive name') {
	    @drives_order = map {
		my $dev = $_;
		find { $_->{device} eq $dev } @drives;
	    } @l;
	} else {
	    my $capacity;
	    if ($t eq 'Can write CD-R') {
		$capacity = 'burner';
	    } elsif ($t eq 'Can read DVD') {
		$capacity = 'DVD';
	    }
	    if ($capacity) {
		each_index {
		    ($drives_order[$::i] || {})->{capacity} .= "$capacity " if $_;
		} @l;
	    }
	}
    }
}

sub complete_usb_storage_info {
    my (@l) = @_;

    my @usb = grep { exists $_->{usb_vendor} } @l;

    foreach my $usb (usb_probe()) {
	if (my $e = find { !$_->{found} && $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
         my $host = get_sysfs_usbpath_for_block($e->{device});
         if ($host) {
             my $file = "/sys/block/$host/../serial";
             $e->{info} = chomp_(cat_($file)) if -e $file;
             $e->{usb_description} = join('|', 
                                          chomp_(cat_("/sys/block/$host/../manufacturer")),
                                          chomp_(cat_("/sys/block/$host/../product")));
         }
         local $e->{found} = 1;
	    $e->{"usb_$_"} ||= $usb->{$_} foreach keys %$usb;
	}
    }
}

sub isBurner { 
    my ($e) = @_;
    $e->{capacity} =~ /burner/ and return 1;
      
    #- do not work for SCSI
    my $f = tryOpen($e->{device}); #- SCSI burner are not detected this way.
    $f && c::isBurner(fileno($f));
}
sub isDvdDrive {
    my ($e) = @_;
    $e->{capacity} =~ /DVD/ || $e->{info} =~ /DVD/ and return 1;

    #- do not work for SCSI
    my $f = tryOpen($e->{device});
    $f && c::isDvdDrive(fileno($f));
}
sub isZipDrive { $_[0]{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
sub isLS120Drive { $_[0]{info} =~ /LS-?120|144MB/ }
sub isKeyUsb { begins_with($_[0]{usb_media_type} || '', 'Mass Storage') && $_[0]{media_type} eq 'hd' }
sub isFloppyUsb { $_[0]{usb_driver} && $_[0]{usb_driver} eq 'Removable:floppy' }
sub may_be_a_hd { 
    my ($e) = @_;
    $e->{media_type} eq 'hd' && !(
	isZipDrive($e) 
           || isLS120Drive($e)
           || begins_with($e->{usb_media_type} || '', 'Mass Storage|Floppy (UFI)')
    );
}

sub get_sysfs_field_from_link {
    my ($device, $field) = @_;
    my $l = readlink("$device/$field");
    $l =~ s!.*/!!;
    $l;
}

sub get_sysfs_usbpath_for_block {
    my ($device) = @_;
    my $host = readlink("/sys/block/$device");
    $host =~ s!/host.*!!;
    $host;
}

sub get_scsi_driver {
    my (@l) = @_;
    # find driver of host controller from sysfs:
    foreach (@l) {
	next if $_->{driver};
	my $host = get_sysfs_usbpath_for_block($_->{device});
	require list_modules;
	$_->{driver} = list_modules::filename2modname(get_sysfs_field_from_link("/sys/block/$host", 'driver'));
    }
}

sub getSCSI() {
    my $dev_dir = '/sys/bus/scsi/devices';

    my @scsi_types = (
	"Direct-Access",
	"Sequential-Access",
	"Printer",
	"Processor",
	"WORM",
	"CD-ROM",
	"Scanner",
	"Optical Device",
	"Medium Changer",
	"Communications",
    );

    my @l;
    foreach (all($dev_dir)) {
	my ($host, $channel, $id, $lun) = split ':';
	defined $lun or next;

	my $dir = "$dev_dir/$_";

	# handle both old and new kernels:
	my $node =  find { -e $_ } "$dir/block", top(glob_("$dir/block*")), "$dir/tape", top(glob_("$dir/scsi_generic*"));
	my ($device) = readlink($node) =~ m!/(?:scsi_(?:generic|tape)|block)/(.*)!;
        if (!$device) {
            ($device) = top(glob_("$node/*")) =~ m!/(?:scsi_(?:generic|tape)|block)/(.*)!;
        }
	warn("cannot get info for device ($_)"), next if !$device;

	my $usb_dir = readlink($dir) =~ m!/usb! && "$dir/../../../..";
	my $get_usb = sub { chomp_(cat_("$usb_dir/$_[0]")) };

	my $get = sub {
	    my $s = cat_("$dir/$_[0]");
	    $s =~ s/\s+$//;
	    $s;
	};

	# Old hp scanners report themselves as "Processor"s
	# (see linux/include/scsi/scsi.h and sans-find-scanner.1)
	my $raw_type = $scsi_types[$get->('type')];

	my $media_type = ${{ st => 'tape', sr => 'cdrom', sd => 'hd', sg => 'generic' }}{substr($device, 0, 2)} ||
	  $raw_type =~ /Scanner|Processor/ && 'scanner';

	my ($vendor, $model) = ($get->('vendor'), $get->('model'));
	my ($v, $m) = _get_hd_vendor($model);
	if ($v && $v) {
            ($vendor, $model) = ($v, $m);
	}
	push @l, { info =>  $vendor . ' ' . $model, host => $host, channel => $channel, id => $id, lun => $lun, 
	  description => join('|', $vendor, $model),
	  bus => 'SCSI', media_type => $media_type, device => $device,
	    $usb_dir ? (
	  usb_vendor => hex($get_usb->('idVendor')), usb_id => hex($get_usb->('idProduct')),
	    ) : (),
        };
    } 

    @l = sort { $a->{host} <=> $b->{host} || $a->{channel} <=> $b->{channel} || $a->{id} <=> $b->{id} || $a->{lun} <=> $b->{lun} } @l;

    complete_usb_storage_info(@l);

    foreach (@l) {
	$_->{media_type} = 'fd' if $_->{media_type} eq 'hd' && isFloppyUsb($_);
    }

    get_sys_cdrom_info(@l);
    get_scsi_driver(@l);
    @l;
}


my %hd_vendors = (
    "ASUS" => "Asus",
    "ATA Maxtor" => "Maxtor",
    "CD-ROM CDU" => "Sony",
    "CD-ROM Drive/F5D" => "ASUSTeK",
    "Compaq" => "Compaq",
    "CONNER" => "Conner Peripherals",
    "IBM" => "IBM",
    "FUJITSU" => "Fujitsu",
    "HITACHI" => "Hitachi",
    "Lite-On" => "Lite-On Technology Corp.",
    "LITE-ON" => "Lite-On Technology Corp.",
    "LTN" => "Lite-On Technology Corp.",
    "IOMEGA" => "Iomega",
    "MAXTOR" => "Maxtor",
    "Maxtor" => "Maxtor",
    "Micropolis" => "Micropolis",
    "Pioneer" => "Pioneer",
    "PLEXTOR" => "Plextor",
    "QUANTUM" => "Quantum", 
    "SAMSUNG" => "Samsung",
    "Seagate " => "Seagate Technology",
    "ST3" => "Seagate Technology",
    "TEAC" => "Teac",
    "TOSHIBA" => "Toshiba",
    "WDC" => "Western Digital Corp.",
);

# return ($vendor, $model)
sub _get_hd_vendor {
    my ($info) = @_;
    foreach my $name (keys %hd_vendors) {
        next if !$name;
        return ($hd_vendors{$name}, $2) if $info =~ /^$name(-|\s)*(.*)/;
    }
    return ("Hitachi", $info) if $info =~ /^HD[ST][0-9]/;
}


sub getIDE() {
    my @idi;

    #- what about a system with absolutely no IDE on it, like some sparc machine.
    -e "/proc/ide" or return ();

    #- Great. 2.2 kernel, things are much easier and less error prone.
    foreach my $d (sort @{[glob_('/proc/ide/hd*')]}) {
	cat_("$d/driver") =~ /ide-scsi/ and next; #- already appears in /proc/scsi/scsi
	my $t = chomp_(cat_("$d/media"));
	my $type = ${{ disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd' }}{$t} or next;
	my $info = chomp_(cat_("$d/model")) || "(none)";

	my $num = ord(($d =~ /(.)$/)[0]) - ord 'a';
	my ($vendor, $model) = _get_hd_vendor($info);

	my $host = $num;
	($host, my $id) = divide($host, 2);
	($host, my $channel) = divide($host, 2);

	push @idi, { media_type => $type, device => basename($d), 
		     info => $info, host => $host, channel => $channel, id => $id, bus => 'ide', 
		     if_($vendor, Vendor => $vendor), if_($model, Model => $model) };
    }
    get_sys_cdrom_info(@idi);
    @idi;
}

sub block_devices() {
    -d '/sys/block' 
      ? map { s|!|/|; $_ } all('/sys/block') 
      : map { $_->{dev} } do { require fs::proc_partitions; fs::proc_partitions::read_raw() };
}

sub getCompaqSmartArray() {
    my (@idi, $f);

    foreach ('array/ida', 'cpqarray/ida', 'cciss/cciss') {
	my $prefix = "/proc/driver/$_"; #- kernel 2.4 places it here
	$prefix = "/proc/$_" if !-e "${prefix}0"; #- kernel 2.2

	my ($name) = m|/(.*)|;
	for (my $i = 0; -r ($f = "${prefix}$i"); $i++) {
	    my @raw_devices = cat_($f) =~ m|^\s*($name/.*?):|gm;

	    #- this is ugly and buggy. keeping it for 2007.0
	    #- on a cciss, cciss/cciss0 didn't contain c0d0, but cciss/cciss1 did contain c0d1
	    #- the line below adds both c0d0 and c0d1 for cciss0, and so some duplicates
	    @raw_devices or @raw_devices = grep { m!^$name/! } block_devices();

	    foreach my $raw_device (@raw_devices) {
		my $device = -d "/dev/$raw_device" ? "$raw_device/disc" : $raw_device;
		push @idi, { device => $device, prefix => $raw_device . 'p', 
			     info => "Compaq RAID logical disk",
			     media_type => 'hd', bus => $name };
	    }
	}
    }
    #- workaround the buggy code above. this should be safe though
    uniq_ { $_->{device} } @idi;
}

sub getDAC960() {
    my %idi;

    #- We are looking for lines of this format:DAC960#0:
    #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
    foreach (syslog()) {
	my ($device, $info) = m|/dev/(rd/.*?): (.*?),| or next;
	$idi{$device} = { info => $info, media_type => 'hd', device => $device, bus => 'dac960' };
    }
    values %idi;
}

sub getATARAID() {
    my %l;
    foreach (syslog()) {
	my ($device) = m|^\s*(ataraid/d\d+):| or next;
	$l{$device} = { info => 'ATARAID block device', media_type => 'hd', device => $device, bus => 'ataraid' };
	log::l("ATARAID: $device");
    }
    values %l;
}

sub getVirtIO() {
    -d '/sys/bus/virtio/devices' or return;
    map {
            { device => basename($_), info => "VirtIO block device", media_type => 'hd', bus => 'virtio' };
    }
    glob("/sys/bus/virtio/devices/*/block/*");
}

# cpu_name : arch() =~ /^alpha/ ? "cpu	" :
# arch() =~ /^ppc/ ? "processor" : "vendor_id"

# cpu_model : arch() =~ /^alpha/ ? "cpu model" :
# arch() =~ /^ppc/ ? "cpu  " : "model name"

# cpu_freq = arch() =~ /^alpha/ ? "cycle frequency [Hz]" :
# arch() =~ /^ppc/ ? "clock" : "cpu MHz"

sub getCPUs() { 
    my (@cpus, $cpu);
    foreach (cat_("/proc/cpuinfo")) {
	   if (/^processor/) { # ix86 specific
		  push @cpus, $cpu if $cpu;
		  $cpu = {};
	   }
	   $cpu->{$1} = $2 if /^([^\t]+).*:\s(.*)$/;
	   $cpu->{processor}++ if $1 eq "processor";
    }
    push @cpus, $cpu;
    @cpus;
}

sub ix86_cpu_frequency() {
    cat_('/proc/cpuinfo') =~ /cpu MHz\s*:\s*(\d+)/ && $1;
}

sub probe_category {
    my ($category) = @_;

    require list_modules;
    my @modules = list_modules::category2modules($category);

    if_($category =~ /sound/ && arch() =~ /ppc/ && get_mac_model() !~ /IBM/,
	{ driver => 'snd_powermac', description => 'Macintosh built-in' },
    ),
    grep {
	if ($category eq 'network/isdn') {
	    my $b = $_->{driver} =~ /ISDN:([^,]*),?([^,]*)(?:,firmware=(.*))?/;
	    if ($b) {
                $_->{driver} = $1;
                $_->{type} = $2;
                $_->{type} =~ s/type=//;
                $_->{firmware} = $3;
                $_->{driver} eq "hisax" and $_->{options} .= " id=HiSax";
	    }
	    $b;
	} else {
	    member($_->{driver}, @modules);
	}
    } probeall();
}

sub getSoundDevices() {
    probe_category('multimedia/sound');
}

sub isTVcardConfigurable { member($_[0]{driver}, qw(bttv cx88 saa7134)) }

sub getTVcards() { probe_category('multimedia/tv') }

sub getInputDevices() {
    my (@devices, $device);