author | Pascal Rigaux <pixel@mandriva.com> | 2006-03-03 13:15:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-03-03 13:15:44 +0000 |
commit | 3805709df4a357a9b57b5067643e3d7ec755c9d9 (patch) | |
tree | 93916777ab3d9c2b3ec51abaf3a7d82dc3e64ecb | |
parent | 5224ba4da68d1092e596f8eb59202dac8fcb2206 (diff) | |
download | drakx-3805709df4a357a9b57b5067643e3d7ec755c9d9.tar drakx-3805709df4a357a9b57b5067643e3d7ec755c9d9.tar.gz drakx-3805709df4a357a9b57b5067643e3d7ec755c9d9.tar.bz2 drakx-3805709df4a357a9b57b5067643e3d7ec755c9d9.tar.xz drakx-3805709df4a357a9b57b5067643e3d7ec755c9d9.zip |
-rw-r--r-- | tools/2adsldb.pm | 17 | ||||
-rw-r--r-- | tools/2isdndb.pm | 25 | ||||
-rwxr-xr-x | tools/alpha/e2fsck.shared | bin | 111080 -> 0 bytes | |||
-rwxr-xr-x | tools/closurepkgs | 108 | ||||
-rw-r--r-- | tools/dmidecode/.cvsignore | 1 | ||||
-rw-r--r-- | tools/dmidecode/Makefile | 17 | ||||
-rw-r--r-- | tools/dmidecode/dmidecode.c | 856 | ||||
-rwxr-xr-x | tools/gencompss | 14 | ||||
-rwxr-xr-x | tools/genmodparm | 145 | ||||
-rwxr-xr-x | tools/i386/e2fsck.shared | bin | 80308 -> 0 bytes | |||
-rwxr-xr-x | tools/i386/mkreiserfs | bin | 15868 -> 0 bytes | |||
-rwxr-xr-x | tools/i386/sh | bin | 153752 -> 0 bytes | |||
-rwxr-xr-x | tools/ia64/e2fsck.shared | bin | 1060504 -> 0 bytes | |||
-rw-r--r-- | tools/ppc/e2fsck.shared | bin | 101469 -> 0 bytes | |||
-rwxr-xr-x | tools/sparc/e2fsck.shared | bin | 125624 -> 0 bytes | |||
-rwxr-xr-x | tools/syncrpms | 267 |
diff --git a/tools/2adsldb.pm b/tools/2adsldb.pm deleted file mode 100644 index 23328aafc..000000000 --- a/tools/2adsldb.pm +++ /dev/null @@ -1,17 +0,0 @@ -open F, "isplist.txt" or die "file $file not found"; -open G, ">tutu" or die "file $file not found"; -foreach (<F>) { - s/\#.*//; - /.*ADSL.*/ or next; -#| NOM | PAYS | CONNECTION | MAILTYPE | SMTP | MAILSERVER | NEWS | MY1DNS | MY2DNS | PROXY | PROXYSERVER | DHCP | EMAIL - s/(.*)france(.*)/$1France$2/; - s/(.*)FRANCE(.*)/$1France$2/; - s/(.*)USA(.*)/$1United States$2/; - s/(.*)U.S.A(.*)/$1United States$2/; - s/(.*)US(.*)/$1United States$2/; - s/(.*)usa(.*)/$1United States$2/; - s/(.*)club-internet(.*)/$1club internet$2/; - my ($name, $country, $connexion, $mailtype, $smtp, $popserver, $mailserver, $news, $dns1, $dns2, $proxy, $proxyserver, $dhcp, $email) = split /\|/; - print G join("|", $country, join("=>", $name, $dns1, $dns2)), "\n"; #$domain, -} - diff --git a/tools/2isdndb.pm b/tools/2isdndb.pm deleted file mode 100644 index 536808706..000000000 --- a/tools/2isdndb.pm +++ /dev/null @@ -1,25 +0,0 @@ -open F, "isdndb.txt" or die "file $file not found"; -open G, ">tutu" or die "file $file not found"; -foreach (<F>) { - s/\#.*//; -# s/\[City\]\s+National//; - /\[Country\]\s*(.*)/ and $country = $1; - /\[City\]\s*(.*)/ and $city = $1; - /\[Name\]\s*(.*)/ and $name = $1; - /\[Prefix\]\s*(.*)/ and $prefix = $1; - /\[ISDN\]\s*(.*)/ and $isdn = $1; - /\[Encaps\]\s*.*/ and do { defined $dns1 and $dns2=""; }; - /\[Domain\]\s*(.*)/ and $domain = $1; - /\[DNS\]\s*(.*)/ and ($dns1 ? $dns2 : $dns1) = $1; - /\[End\]\s*(.*)/ and do { undef $name; undef $prefix; undef $isdn; undef $domain; undef $dns1; undef $dns2; }; - if ($isdn && !$prefix) { $prefix = "" } - if (defined $name && defined $isdn && defined $domain && defined $dns1 && defined $dns2) { - print G join("|", $country, $city, join("=>", $name, $prefix . $isdn, $domain, $dns1, $dns2)), "\n"; - undef $name; - undef $prefix; - undef $isdn; - undef $domain; - undef $dns1; - undef $dns2; - } -} diff --git a/tools/alpha/e2fsck.shared b/tools/alpha/e2fsck.shared Binary files differdeleted file mode 100755 index 765e664a1..000000000 --- a/tools/alpha/e2fsck.shared +++ /dev/null diff --git a/tools/closurepkgs b/tools/closurepkgs deleted file mode 100755 index 2ef479486..000000000 --- a/tools/closurepkgs +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/perl - -use rpmtools; - -sub chop_version($) { - ($_[0] =~ /(.*)-[^-]+-[^-]+/)[0] || $_[0]; -} - -sub read_compsslist { - my ($file) = @_; - my %compsslist; - - local *F; - open F, $file or die "closurepkgs: unable to open compsslist file $file\n"; - foreach (<F>) { - my ($name, $level) = /^\s*(\S+)\s+(\d+)/; - $compsslist{$name} = $level; - } - close F; - - \%compsslist; -} - -sub main { - my ($dir, $lang) = @_; - - #- compute depslist on line directly. - my $params = new rpmtools; - foreach (glob("$dir/*.cz*")) { $params->read_hdlists($_) } - $params->keep_only_cleaned_provides_files(); - foreach (glob("$dir/*.cz*")) { $params->read_hdlists($_) } - $params->compute_depslist(); - - my $compsslist = read_compsslist("$dir/compssList"); - - #- DO NOT FORGET TO UPDATE HERE ACCORDING TO gi/perl-install/install_any.pm - my @pkgs = qw(XFree86 XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa - dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl-fr rp-pppoe ppp ypbind - rhs-printfilters lpr cups cups-drivers samba ncpfs ghostscript-utils - kernel-pcmcia-cs apmd cdrecord - ); - push @pkgs, "XFree86-$_" foreach qw(3DLabs 3dfx 8514 AGX FBDev I128 Mach8 Mach32 Mach64 Mono P9000 Rage128 S3 S3V SVGA VGA16 W32); - - #- closure the list of package to be kept for oem. - my %closure; - foreach (@pkgs) { - $closure{$_} = 1; - map { $closure{chop_version($_->{name})} = 1 } map { $params->{depslist}[$_] } map { split /\|/ } split ' ', $params->{info}{$_}{deps}; - } - #- only if dependancy is ok. - $closure{$_} = 1 foreach qw(xpp kups kisdn); - - #- closure the list of package to always install for oem. (level >= 50)... - my %install; - my @force_install; - if ($params->{info}{"locales-$lang"}) { - foreach (keys %{$params->{info}}) { - push @force_install, $_ if grep { $_ == $params->{info}{"locales-$lang"}{id} } split ' ', $params->{info}{$_}{deps}; - } - } else { - foreach (keys %{$params->{info}}) { - push @force_install, $_ if grep { $params->{depslist}[$_]{name} =~ /locales-/ } split ' ', $params->{info}{$_}{deps}; - } - } - push @force_install, qw(cups cups-drivers drakprofile draksync irda-utils numlock raidtools reiserfs-utils - Mesa Mesa-demos alsa alsa-utils); - foreach (qw( - Aurora xawtv kwintv xscreensaver-gl Mesa-demos xmms-mesa bzflag csmash gltron spacecup chromium tuxracer - ), @force_install, grep { $compsslist->{$_} >= 50 } keys %{$params->{info}}) { - $install{$_} = 1; - map { $install{chop_version($_->{name})} = 1 } map { $params->{depslist}[$_] } map { split /\|/ } split ' ', $params->{info}{$_}{deps}; - } - - #- remove base packages, which have to be installed, according to basesystem. - delete $closure{'basesystem'}; - $install{'basesystem'} = 1; - map { delete $closure{chop_version($_->{name})}; - $install{chop_version($_->{name})} = 1 } map { $params->{depslist}[$_] } map { split /\|/ } split ' ', $params->{info}{'basesystem'}{deps}; - - #- special packages that are to be move to closure always ... - foreach (qw(kernel-smp kernel-linus kernel-secure hackkernel-smp hackkernel-linus hackkernel-secure - Aurora xawtv kwintv xscreensaver-gl xmms-mesa bzflag csmash gltron spacecup chromium tuxracer - )) { - $params->{info}{$_} or next; - $closure{$_} = 1; - delete $install{$_}; - } - - #- dump out the list of package according to the 2 lists defined above. - my $total_install = 0; - my $total_closure = 0; - foreach (@{$params->{depslist}}) { - my $tiny_name = chop_version($_->{name}); - if (exists $install{$tiny_name}) { - my $p = $params->{info}{$tiny_name}; - $total_install += $p->{size}; - print "I:$p->{name}-$p->{version}-$p->{release}\n"; - } elsif (exists $closure{$tiny_name}) { - my $p = $params->{info}{$tiny_name}; - $total_closure += $p->{size}; - print "C:$p->{name}-$p->{version}-$p->{release}\n"; - } - } - print "\n\ntotal_install=$total_install\n"; - print "total_closure=$total_closure\n"; -} - -main(@ARGV); diff --git a/tools/dmidecode/.cvsignore b/tools/dmidecode/.cvsignore deleted file mode 100644 index 9b4923a2d..000000000 --- a/tools/dmidecode/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -dmidecode diff --git a/tools/dmidecode/Makefile b/tools/dmidecode/Makefile deleted file mode 100644 index fe53436f4..000000000 --- a/tools/dmidecode/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -CFLAGS=-Wall -O # -g -DDEBUG -TARGETS=dmidecode - -ARCH := $(patsubst i%86,i386,$(shell uname -m)) -ARCH := $(patsubst sparc%,sparc,$(ARCH)) - -ifeq (i386,$(ARCH)) - -dmidecode: dmidecode.o - -else -dmidecode: not_handled.c - gcc -o $@ $< -endif - -clean: - $(RM) $(TARGETS) *.o core diff --git a/tools/dmidecode/dmidecode.c b/tools/dmidecode/dmidecode.c deleted file mode 100644 index 576fd4fc1..000000000 --- a/tools/dmidecode/dmidecode.c +++ /dev/null @@ -1,856 +0,0 @@ -/* - * DMI decode rev 1.2 - * - * (C) 2000,2001 Alan Cox <alan@redhat.com> - * - * 2-July-2001 Matt Domsch <Matt_Domsch@dell.com> - * Additional structures displayed per SMBIOS 2.3.1 spec - * - * Licensed under the GNU Public license. If you want to use it in with - * another license just ask. - */ - -#include <stdio.h> -#include <unistd.h> -#include <fcntl.h> -#include <string.h> -#include <stdlib.h> - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; - -static void -dump_raw_data(void *data, unsigned int length) -{ - unsigned char buffer1[80], buffer2[80], *b1, *b2, c; - unsigned char *p = data; - unsigned long column=0; - unsigned int length_printed = 0; - const unsigned char maxcolumn = 16; - while (length_printed < length) { - b1 = buffer1; - b2 = buffer2; - for (column = 0; - column < maxcolumn && length_printed < length; - column ++) { - b1 += sprintf(b1, "%02x ",(unsigned int) *p); - if (*p < 32 || *p > 126) c = '.'; - else c = *p; - b2 += sprintf(b2, "%c", c); - p++; - length_printed++; - } - /* pad out the line */ - for (; column < maxcolumn; column++) - { - b1 += sprintf(b1, " "); - b2 += sprintf(b2, " "); - } - - printf("%s\t%s\n", buffer1, buffer2); - } -} - - - -struct dmi_header -{ - u8 type; - u8 length; - u16 handle; -}; - -static char *dmi_string(struct dmi_header *dm, u8 s) -{ - u8 *bp=(u8 *)dm; - if (!s) return ""; - - bp+=dm->length; - while(s>1) - { - bp+=strlen(bp); - bp++; - s--; - } - return bp; -} - -static void dmi_decode_ram(u16 data) -{ - if(data&(1<<0)) - printf("OTHER "); - if(data&(1<<1)) - printf("UNKNOWN "); - if(data&(1<<2)) - printf("STANDARD "); - if(data&(1<<3)) - printf("FPM "); - if(data&(1<<4)) - printf("EDO "); - if(data&(1<<5)) - printf("PARITY "); - if(data&(1<<6)) - printf("ECC "); - if(data&(1<<7)) - printf("SIMM "); - if(data&(1<<8)) - printf("DIMM "); - if(data&(1<<9)) - printf("Burst EDO "); - if(data&(1<<10)) - printf("SDRAM "); -} - -static void dmi_cache_size(u16 n) -{ - if(n&(1<<15)) - printf("%dK\n", (n&0x7FFF)*64); - else - printf("%dK\n", n&0x7FFF); -} - -static void dmi_decode_cache(u16 c) -{ - if(c&(1<<0)) - printf("Other "); - if(c&(1<<1)) - printf("Unknown "); - if(c&(1<<2)) - printf("Non-burst "); - if(c&(1<<3)) - printf("Burst "); - if(c&(1<<4)) - printf("Pipeline burst "); - if(c&(1<<5)) - printf("Synchronous "); - if(c&(1<<6)) - printf("Asynchronous "); -} - -static char *dmi_bus_name(u8 num) -{ - static char *bus[]={ - "", - "", - "", - "ISA ", - "MCA ", - "EISA ", - "PCI ", - "PCMCIA " - "VLB ", - "Proprietary ", - "CPU Slot ", - "Proprietary RAM ", - "I/O Riser ", - "NUBUS ", - "PCI-66 ", - "AGP ", - "AGP 2x ", - "AGP 4x " - }; - static char *jpbus[]={ - "PC98/C20", - "PC98/C24", - "PC98/E", - "PC98/LocalBus", - "PC98/Card" - }; - - if(num<=0x12) - return bus[num]; - if(num>=0xA0 && num<0xA5) - return jpbus[num]; - return ""; -} - -static char *dmi_bus_width(u8 code) -{ - static char *width[]={ - "", - "", - "", - "8bit ", - "16bit ", - "32bit ", - "64bit ", - "128bit " - }; - if(code>7) - return ""; - return width[code]; -} - -static char *dmi_card_size(u8 v) -{ - if(v==2) - return("Short "); - if(v==3) - return("Long "); - return ""; -} - -static void dmi_card_props(u8 v) -{ - printf("\t\tSlot Features: "); - if(v&(1<<1)) - printf("5v "); - if(v&(1<<2)) - printf("3.3v "); - if(v&(1<<3)) - printf("Shared "); - if(v&(1<<4)) - printf("PCCard16 "); - if(v&(1<<5)) - printf("CardBus "); - if(v&(1<<6)) - printf("Zoom-Video "); - if(v&(1<<7)) - printf("ModemRingResume "); - printf("\n"); -} - -static char *dmi_chassis_type(u8 code) -{ - static char *chassis_type[]={ - "", - "Other", - "Unknown", - "Desktop", - "Low Profile Desktop", - "Pizza Box", - "Mini Tower", - "Tower", - "Portable", - "Laptop", - "Notebook", - "Hand Held", - "Docking Station", - "All in One", - "Sub Notebook", - "Space-saving", - "Lunch Box", - "Main Server Chassis", - "Expansion Chassis", - "SubChassis", - "Bus Expansion Chassis", - "Peripheral Chassis", - "RAID Chassis", - "Rack Mount Chassis", - "Sealed-case PC", - }; - code &= ~0x80; - - if(code>0x18) - return ""; - return chassis_type[code]; - -} - -static char *dmi_port_connector_type(u8 code) -{ - static char *connector_type[]={ - "None", - "Centronics", - "Mini Centronics", - "Proprietary", - "DB-25 pin male", - "DB-25 pin female", - "DB-15 pin male", - "DB-15 pin female", - "DB-9 pin male", - "DB-9 pin female", - "RJ-11", - "RJ-45", - "50 Pin MiniSCSI", - "Mini-DIN", - "Micro-DIN", - "PS/2", - "Infrared", - "HP-HIL", - "Access Bus (USB)", - "SSA SCSI", - "Circular DIN-8 male", - "Circular DIN-8 female", - "On Board IDE", - "On Board Floppy", - "9 Pin Dual Inline (pin 10 cut)", - "25 Pin Dual Inline (pin 26 cut)", - "50 Pin Dual Inline", - "68 Pin Dual Inline", - "On Board Sound Input from CD-ROM", - "Mini-Centronics Type-14", - "Mini-Centronics Type-26", - "Mini-jack (headphones)", - "BNC", - "1394", - "PC-98", - "PC-98Hireso", - "PC-H98", - "PC-98Note", - "PC98Full", - }; - - if(code == 0xFF) - return "Other"; - - if (code > 0xA4) - return ""; - return connector_type[code]; - -} - -static char *dmi_port_type(u8 code) -{ - static char *port_type[]={ - "None", - "Parallel Port XT/AT Compatible", - "Parallel Port PS/2", - "Parallel Port ECP", - "Parallel Port EPP", - "Parallel Port ECP/EPP", - "Serial Port XT/AT Compatible", - "Serial Port 16450 Compatible", - "Serial Port 16650 Compatible", - "Serial Port 16650A Compatible", - "SCSI Port", - "MIDI Port", - "Joy Stick Port", - "Keyboard Port", - "Mouse Port", - "SSA SCSI", - "USB", - "FireWire (IEEE P1394)", - "PCMCIA Type I", - "PCMCIA Type II", - "PCMCIA Type III", - "Cardbus", - "Access Bus Port", - "SCSI II", - "SCSI Wide", - "PC-98", - "PC-98-Hireso", - "PC-H98", - "Video Port", - "Audio Port", - "Modem Port", - "Network Port", - "8251 Compatible", - "8251 FIFO Compatible", - }; - - if(code == 0xFF) - return "Other"; - - if (code > 0xA1) - return ""; - return port_type[code]; - -} - -static char *dmi_processor_type(u8 code) -{ - static char *processor_type[]={ - "", - "Other", - "Unknown", - "Central Processor", - "Math Processor", - "DSP Processor", - "Video Processor" - }; - - if(code == 0xFF) - return "Other"; - - if (code > 0xA1) - return ""; - return processor_type[code]; -} - -static char *dmi_processor_family(u8 code) -{ - static char *processor_family[]={ - "", - "Other", - "Unknown", - "8086", - "80286", - "Intel386 processor", - "Intel486 processor", - "8087", - "80287", - "80387", - "80487", - "Pentium processor Family", - "Pentium Pro processor", - "Pentium II processor", - "Pentium processor with MMX technology", - "Celeron processor", - "Pentium II Xeon processor", - "Pentium III processor", - "M1 Family", - "M1","M1","M1","M1","M1","M1", /* 13h - 18h */ - "K5 Family", - "K5","K5","K5","K5","K5","K5", /* 1Ah - 1Fh */ - "Power PC Family", - "Power PC 601", - "Power PC 603", - "Power PC 603+", - "Power PC 604", - }; - - if(code == 0xFF) - return "Other"; - - if (code > 0x24) - return ""; - return processor_family[code]; -} - -static char *dmi_onboard_type(u8 code) -{ - static char *onboard_type[]={ - "", - "Other", - "Unknown", - "Video", - "SCSI Controller", - "Ethernet", - "Token Ring", - "Sound", - }; - code &= 0x80; - if (code > 7) - return ""; - return onboard_type[code]; -} - - -static void dmi_table(int fd, u32 base, int len, int num) -{ - char *buf=malloc(len); - struct dmi_header *dm; - u8 *data; - int i=0; - - if(lseek(fd, (long)base, 0)==-1) - { - perror("dmi: lseek"); - return; - } - if(read(fd, buf, len)!=len) - { - perror("dmi: read"); - return; - } - data = buf; - while(i<num) - { - u32 u; - u32 u2; - dm=(struct dmi_header *)data; - printf("Handle 0x%04X\n\tDMI type %d, %d bytes.\n", - dm->handle, - dm->type, dm->length); - - switch(dm->type) - { - case 0: - printf("\tBIOS Information Block\n"); - printf("\t\tVendor: %s\n", - dmi_string(dm, data[4])); - printf("\t\tVersion: %s\n", - dmi_string(dm, data[5])); - printf("\t\tRelease: %s\n", - dmi_string(dm, data[8])); - printf("\t\tBIOS base: 0x%04X0\n", - data[7]<<8|data[6]); - printf("\t\tROM size: %dK\n", - 64*data[9]); - printf("\t\tCapabilities:\n"); - u=data[13]<<24|data[12]<<16|data[11]<<8|data[10]; - u2=data[17]<<24|data[16]<<16|data[15]<<8|data[14]; - printf("\t\t\tFlags: 0x%08X%08X\n", - u2,u); - break; - - case 1: - printf("\tSystem Information Block\n"); - printf("\t\tVendor: %s\n", - dmi_string(dm, data[4])); - printf("\t\tProduct: %s\n", - dmi_string(dm, data[5])); - printf("\t\tVersion: %s\n", - dmi_string(dm, data[6])); - printf("\t\tSerial Number: %s\n", - dmi_string(dm, data[7])); - break; - - case 2: - printf("\tBoard Information Block\n"); - printf("\t\tVendor: %s\n", - dmi_string(dm, data[4])); - printf("\t\tProduct: %s\n", - dmi_string(dm, data[5])); - printf("\t\tVersion: %s\n", - dmi_string(dm, data[6])); - printf("\t\tSerial Number: %s\n", - dmi_string(dm, data[7])); - break; - - case 3: - printf("\tChassis Information Block\n"); - printf("\t\tVendor: %s\n", - dmi_string(dm, data[4])); - printf("\t\tChassis Type: %s\n", - dmi_chassis_type(data[5])); - if (data[5] & 0x80) - printf("\t\t\tLock present\n"); - printf("\t\tVersion: %s\n", - dmi_string(dm, data[6])); - printf("\t\tSerial Number: %s\n", - dmi_string(dm, data[7])); - printf("\t\tAsset Tag: %s\n", - dmi_string(dm, data[8])); - break; - - case 4: - printf("\tProcessor\n"); - printf("\t\tSocket Designation: %s\n", - dmi_string(dm, data[4])); - printf("\t\tProcessor Type: %s\n", - dmi_processor_type(data[5])); - printf("\t\tProcessor Family: %s\n", - dmi_processor_family(data[6])); - printf("\t\tProcessor Manufacturer: %s\n", - dmi_string(dm, data[7])); - printf("\t\tProcessor Version: %s\n", - dmi_string(dm, data[0x10])); - if (dm->length <= 0x20) break; - printf("\t\tSerial Number: %s\n", - dmi_string(dm, data[0x20])); - printf("\t\tAsset Tag: %s\n", - dmi_string(dm, data[0x21])); - printf("\t\tVendor Part Number: %s\n", - dmi_string(dm, data[0x22])); - break; - - case 5: - printf("\tMemory Controller\n"); - break; - - case 6: - printf("\tMemory Bank\n"); - printf("\t\tSocket: %s\n", dmi_string(dm, data[4])); - if(data[5]!=0xFF) - { - printf("\t\tBanks: "); - if((data[5]&0xF0)!=0xF0) - printf("%d ", - data[5]>>4); - if((data[5]&0x0F)!=0x0F) - printf("%d", - data[5]&0x0F); - printf("\n"); - } - if(data[6]) - printf("\t\tSpeed: %dnS\n", data[6]); - printf("\t\tType: "); - dmi_decode_ram(data[8]<<8|data[7]); - printf("\n"); - printf("\t\tInstalled Size: "); - switch(data[9]&0x7F) - { - case 0x7D: - printf("Unknown");break; - case 0x7E: - printf("Disabled");break; - case 0x7F: - printf("Not Installed");break; - default: - printf("%dMbyte", - (1<<(data[9]&0x7F))); - } - if(data[9]&0x80) - printf(" (Double sided)"); - printf("\n"); - printf("\t\tEnabled Size: "); - switch(data[10]&0x7F) - { - case 0x7D: - printf("Unknown");break; - case 0x7E: - printf("Disabled");break; - case 0x7F: - printf("Not Installed");break; - default: - printf("%dMbyte", - (1<<(data[10]&0x7F))); - } - if(data[10]&0x80) - printf(" (Double sided)"); - printf("\n"); - if((data[11]&4)==0) - { - if(data[11]&(1<<0)) - printf("\t\t*** BANK HAS UNCORRECTABLE ERRORS (BIOS DISABLED)\n"); - if(data[11]&(1<<1)) - printf("\t\t*** BANK LOGGED CORRECTABLE ERRORS AT BOOT\n"); - } - break; - case 7: - { - static char *types[4]={ - "Internal ", "External ", - "", ""}; - static char *modes[4]={ - "write-through", - "write-back", - "",""}; - - printf("\tCache\n"); - printf("\t\tSocket: %s\n", - dmi_string(dm, data[4])); - u=data[6]<<8|data[5]; - printf("\t\tL%d %s%sCache: ", - 1+(u&7), (u&(1<<3))?"socketed ":"", - types[(u>>5)&3]); - if(u&(1<<7)) - printf("%s\n", - modes[(u>>8)&3]); - else - printf("disabled\n"); - printf("\t\tL%d Cache Size: ", 1+(u&7)); - dmi_cache_size(data[7]|data[8]<<8); - printf("\t\tL%d Cache Maximum: ", 1+(u&7)); - dmi_cache_size(data[9]|data[10]<<8); - printf("\t\tL%d Cache Type: ", 1+(u&7)); - dmi_decode_cache(data[13]); - printf("\n"); - } - break; - - case 8: - printf("\tPort Connector\n"); - printf("\t\tInternal Designator: %s\n", - dmi_string(dm, data[4])); - printf("\t\tInternal Connector Type: %s\n", - dmi_port_connector_type(data[5])); - printf("\t\tExternal Designator: %s\n", - dmi_string(dm, data[6])); - printf("\t\tExternal Connector Type: %s\n", - dmi_port_connector_type(data[7])); - printf("\t\tPort Type: %s\n", - dmi_port_type(data[8])); - break; - - - - case 9: - printf("\tCard Slot\n"); - printf("\t\tSlot: %s\n", - dmi_string(dm, data[4])); - printf("\t\tType: %s%s%s\n", - dmi_bus_width(data[6]), - dmi_card_size(data[8]), - dmi_bus_name(data[5])); - if(data[7]==3) - printf("\t\tStatus: Available.\n"); - if(data[7]==4) - printf("\t\tStatus: In use.\n"); - if(data[11]&0xFE) - dmi_card_props(data[11]); - break; - - case 10: - printf("\tOn Board Devices Information\n"); - for (u=0; u<((dm->length - 4)/2); u++) { - printf("\t\tDescription: %s : %s\n", - dmi_string(dm, data[5+(2*u)]), - (data[4+(2*u)]) & 0x80 ? - "Enabled" : "Disabled"); - printf("\t\tType: %s\n", - dmi_onboard_type(data[4+(2*u)])); - - } - - break; - - - case 11: - printf("\tOEM Data\n"); - for(u=1;u<=data[4];u++) - printf("\t\t%s\n", dmi_string(dm,u)); - break; - case 12: - printf("\tConfiguration Information\n"); - for(u=1;u<=data[4];u++) - printf("\t\t%s\n", dmi_string(dm,u)); - break; - - case 13: - printf("\tBIOS Language Information\n"); - break; - - case 14: - printf("\tGroup Associations\n"); - for (u=0; u<(dm->length - 5)/3 ; u++) { - printf("\t\tGroup Name: %s\n", - dmi_string(dm,data[4])); - printf("\t\t\tType: 0x%02x\n", *(data+5+(u*3))); - printf("\t\t\tHandle: 0x%04x\n", - *(u16*)(data+6+(u*3))); - } - break; - - - case 15: - printf("\tEvent Log\n"); - printf("\t\tLog Area: %d bytes.\n", - data[5]<<8|data[4]); - printf("\t\tLog Header At: %d.\n", - data[7]<<8|data[6]); - printf("\t\tLog Data At: %d.\n", - data[9]<<8|data[8]); - printf("\t\tLog Type: %d.\n", - data[10]); - if(data[11]&(1<<0)) - printf("\t\tLog Valid: Yes.\n"); - if(data[11]&(1<<1)) - printf("\t\t**Log Is Full**.\n"); - break; - - case 16: - printf("\tPhysical Memory Array\n"); - break; - case 17: - printf("\tMemory Device\n"); - break; - case 18: - printf("\t32-bit Memory Error Information\n"); - break; - case 19: - printf("\tMemory Array Mapped Address\n"); - break; - case 20: - printf("\tMemory Device Mapped Address\n"); - break; - case 24: - printf("\tHardware Security\n"); - break; - case 25: - printf("\tSystem Power Controls\n"); - break; - case 32: - printf("\tSystem Boot Information\n"); - break; - case 126: - printf("\tInactive\n"); - break; - - case 127: - printf("\tEnd-of-Table\n"); - break; - - default: - if (dm->length > 4) - dump_raw_data(data+4, dm->length-4); - break; - - - - } - data+=dm->length; - while(*data || data[1]) - data++; - data+=2; - i++; - } - free(buf); -} - - -char key[8]={'R','S','D',' ','P','T','R',' '}; - -char zot[16]; - -int main(int argc, char *argv[]) -{ - unsigned char buf[20]; - int fd=open("/dev/mem", O_RDONLY); - long fp=0xE0000L; - if(fd==-1) - { - perror("/dev/mem"); - exit(1); - } - if(lseek(fd,fp,0)==-1) - { - perror("seek"); - exit(1); - } - - - fp -= 16; - - while( fp < 0xFFFFF) - { - fp+=16; - if(read(fd, buf, 16)!=16) - perror("read"); -// if(memcmp(buf, zot, 16)==0) -// printf("*"); - if(memcmp(buf, "_SM_", 4)==0) { - printf("SMBIOS %d.%d present.\n", buf[6], buf[7]); - } - - if(memcmp(buf, "_SYSID_", 7)==0) - printf("SYSID present.\n"); - if(memcmp(buf, "_DMI_", 5)==0) - { - u16 num=buf[13]<<8|buf[12]; - u16 len=buf[7]<<8|buf[6]; - u32 base=buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8]; - - printf("DMI %d.%d present.\n", - buf[14]>>4, buf[14]&0x0F); - printf("%d structures occupying %d bytes.\n", - buf[13]<<8|buf[12], - buf[7]<<8|buf[6]); - printf("DMI table at 0x%08X.\n", - buf[11]<<24|buf[10]<<16|buf[9]<<8|buf[8]); - dmi_table(fd, base,len, num); - } - if(memcmp(buf, "$PnP", 4)==0) - printf("PNP BIOS present.\n"); - if(memcmp(buf, key, 8)==0) - { - int a; - unsigned char sum=0; - unsigned int i=0, checksum=0; - printf("RSD PTR found at 0x%lX\n", fp); - for (i=0; i<20; i++) checksum += buf[i]; - if (checksum != 0) { - printf("checksum failed.\n"); - } - - if(buf[15]!=0) - { - printf("Reserved check failed.\n"); - } - printf("OEM "); - fwrite(buf+9, 6, 1, stdout); - printf("\n"); - read(fd,buf+16,4); - lseek(fd, -4, 1); - for(a=0;a<20;a++) - sum+=buf[a]; - if(sum!=0) - printf("Bad checksum.\n"); - } - } - close(fd); - return 0; -} diff --git a/tools/gencompss b/tools/gencompss deleted file mode 100755 index b12328e49..000000000 --- a/tools/gencompss +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl - -open F, "packdrake -c @ARGV | hdlist2groups - |"; -foreach (<F>) { - chop; - /(.*):(.*)/; - $l{$2}{$1} = undef; -} -close F or die; -foreach (sort keys %l) { - print "$_\n"; - print "\t$_\n" foreach sort keys %{$l{$_}}; - print "\n"; -} diff --git a/tools/genmodparm b/tools/genmodparm deleted file mode 100755 index 52dfce7fd..000000000 --- a/tools/genmodparm +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/perl - -# Mandriva Graphic Install -# Copyright (C) 1999-2005 Mandriva (fpons@mandriva.com) -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -$srctop = $ARGV[0]; - -unless (-d $srctop) { - print STDERR "usage: $0 <linux_src_top>\n"; - print STDERR " <linux_src_top> is the linux source top directory,\n"; - print STDERR " for example /usr/src/linux\n"; - exit 1; -} - -open (FILE_LIST, "find $srctop/ -name \"*.c\" |"); - -while (<FILE_LIST>) { - chomp; - - my $file = $_; - my $dir = $file; - my $module = $file; - my $incfile; - my @incfiles; - my %parms; - my $oldline; - my $descline; - my $default; - my %substvars; - - # get mormalized directory name. - $dir =~ s/^(.*)\/[^\/]*$/$1/; - - # get mormalized module name. - $module =~ s/^.*\/([^\/]*)\.c$/$1/; - - # search for recogniwed special keywords. - open (F, $file); - while (<F>) { - # track for include files. - if (/^\#\s*include\s+[\<\"]([\w-\.\/]*)[\"\>]/) { - # search from /usr/src/linux/include directory. - push @incfiles, "/usr/src/linux/include/$1"; - - # search from current working directory. - push @incfiles, "$dir/$1"; - } - - if (/^\s*MODULE_PARM\s*\((\w*)\s*,\s*\"/) { - $parms{$1}{type} = '?'; - } - if (/^\s*MODULE_PARM\s*\((\w*)\s*,\s*\"([^\"]*)\"\s*\)/) { - $parms{$1}{type} = $2; - } - if (/^\s*MODULE_PARM_DESC\s*\((\w*)\s*,\s*\"([^\"]*)\"\s*\)/) { - $parms{$1}{desc} = $2; - } - } - close F; - - # parse associated include file if exist. - foreach $incfile (@incfiles) { - if (-r $incfile) { - open (F, $incfile); - while (<F>) { - s/^(.*)\/\*.*$/$1/g; - if (/^\#\s*define\s*(\w*)\s*(.*)$/) { - $substvars{$1}=$2; - } - } - close F; - } - } - - # search for comments about each module parameter. - open (F, $file); - while (<F>) { - my $line = $_; - - # manage simple preprocessor. - s/^(.*)\/\*.*$/$1/g; - if (/^\#\s*define\s*(\w*)\s*(.*)$/) { - $substvars{$1}=$2; - } - - # parse for parameters definition. - foreach $parm (keys %parms) { - if ($line =~ /^\s*(static\s+)?((short|long|signed|unsigned)\s+)?\w+(\s*\**\s+|\s+\**\s*)$parm(\s*\[.*\]\s*)?\s*=\s*([^\;]*)\;/) { - $default = $descline = $6; - $default =~ s/^(.*)\/\*.*$/$1/g; - - # remove hypothetic couple of { }. - $default =~ s/^(\s*\{\s*)(.*)(\s*\}\s*)$/$2/; - - # subsitute variable. - foreach $substvar (keys %substvars) { - $default =~ s/$substvar/$substvars{$substvar}/g; - } - $default =~ s/NULL/0/g; - $default =~ s/^\s*(.*?)\s*$/$1/; - $default = '' if $default =~ /\(\s*\(\s*void*\s*\*\)\s*0\s*\)\s*,?/; - - # store value. - $parms{$parm}{default} = $default; - - # try to search a comment on the previous line. - if (!defined($parms{$parm}{desc})) { - if ($oldline =~ /^\s*\/\*\s*(.*)\s*\*\/\s*$/ || /\/\*\s*(.*)\s*\*\/\s*$/) { - $parms{$parm}{desc} = $1; - } - } - - # try to search a comment on the line (multiline not supported). - if (!defined($parms{$parm}{desc})) { - if ($descline =~ /^.*\/\*\s*(.*)\s*\*\/\s*$/) { - $parms{$parm}{desc} = $1; - } - } - } - } - $oldline = $_; - } - close F; - - # dump all result to stdout associated to current module. - foreach $parm (keys %parms) { - print "$module:$parm:$parms{$parm}{type}:$parms{$parm}{default}:$parms{$parm}{desc}\n"; - } -} - -close FILE_LIST; diff --git a/tools/i386/e2fsck.shared b/tools/i386/e2fsck.shared Binary files differdeleted file mode 100755 index ad4d660a0..000000000 --- a/tools/i386/e2fsck.shared +++ /dev/null diff --git a/tools/i386/mkreiserfs b/tools/i386/mkreiserfs Binary files differdeleted file mode 100755 index 65fdf49f6..000000000 --- a/tools/i386/mkreiserfs +++ /dev/null diff --git a/tools/i386/sh b/tools/i386/sh Binary files differdeleted file mode 100755 index 084a97837..000000000 --- a/tools/i386/sh +++ /dev/null diff --git a/tools/ia64/e2fsck.shared b/tools/ia64/e2fsck.shared deleted file mode 100755 index 1ca570a7b..000000000 --- a/tools/ia64/e2fsck.shared +++ /dev/null |