diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2007-01-05 19:44:46 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2007-01-05 19:44:46 +0000 |
commit | fd07aeb4839fad32718633eefe241b44e9002090 (patch) | |
tree | 55771eda34522207260c2034f3c270dc8895eef0 /sys-apps/hwsetup/files | |
parent | Fix for bug #159962 for the BSD/OSX folks. (diff) | |
download | historical-fd07aeb4839fad32718633eefe241b44e9002090.tar.gz historical-fd07aeb4839fad32718633eefe241b44e9002090.tar.bz2 historical-fd07aeb4839fad32718633eefe241b44e9002090.zip |
Version bump to 1.2, which should fix bug #159733 (at least, it works here w/ sys-apps/pciutils-2.2.3-r2).
Package-Manager: portage-2.1.2_rc4-r1
Diffstat (limited to 'sys-apps/hwsetup/files')
-rw-r--r-- | sys-apps/hwsetup/files/digest-hwsetup-1.2 | 3 | ||||
-rw-r--r-- | sys-apps/hwsetup/files/hwsetup-1.2-dyn_blacklist.patch | 62 | ||||
-rw-r--r-- | sys-apps/hwsetup/files/hwsetup-1.2-fastprobe.patch | 75 | ||||
-rw-r--r-- | sys-apps/hwsetup/files/hwsetup-1.2-gentoo.patch | 41 |
4 files changed, 181 insertions, 0 deletions
diff --git a/sys-apps/hwsetup/files/digest-hwsetup-1.2 b/sys-apps/hwsetup/files/digest-hwsetup-1.2 new file mode 100644 index 000000000000..66e578b9651f --- /dev/null +++ b/sys-apps/hwsetup/files/digest-hwsetup-1.2 @@ -0,0 +1,3 @@ +MD5 78485cc6011e8079d794a7ef9e2145e1 hwsetup_1.2-3.tar.gz 10828 +RMD160 d3ce42ac74e5b0ccb9ae73fc0092f172b83a653a hwsetup_1.2-3.tar.gz 10828 +SHA256 faf346f5f342c0ab26631e31440632f6009ff206feafd1667a488e2f0ba4bb37 hwsetup_1.2-3.tar.gz 10828 diff --git a/sys-apps/hwsetup/files/hwsetup-1.2-dyn_blacklist.patch b/sys-apps/hwsetup/files/hwsetup-1.2-dyn_blacklist.patch new file mode 100644 index 000000000000..7348993d264b --- /dev/null +++ b/sys-apps/hwsetup/files/hwsetup-1.2-dyn_blacklist.patch @@ -0,0 +1,62 @@ +diff -urN hwsetup-1.2.orig/hwsetup.c hwsetup-1.2/hwsetup.c +--- hwsetup-1.2.orig/hwsetup.c 2005-05-28 18:11:51.000000000 -0400 ++++ hwsetup-1.2/hwsetup.c 2005-11-17 14:08:03.000000000 -0500 +@@ -43,12 +43,39 @@ + /* Do not, under any circumstances, load these modules automatically, */ + /* even if in pcitable. (libkudzu may ignore this, and the KNOPPIX */ + /* autoconfig scripts may probe them, too) */ +-char *blacklist[] = ++char blacklist[200][200] = + { "apm","agpgart","yenta_socket","i82092","i82365","tcic", + "pcmcia_core","ds","ohci1394","hisax", + /* Winmodems, unusable, can block sound slot */ + "snd-atiixp-modem", "snd-intel8x0m","snd-via82xx-modem" + }; ++ ++int blacklistsize = 13; ++void gen_blacklist(){ ++ int n = 13; ++ int size = 0; ++ char *comment; ++ char module[1024]; ++ FILE *stream; ++ ++ if((stream = fopen ("/etc/hotplug/blacklist", "r")) != (FILE *)0) { ++ while((fgets(module, 1023, stream)) != (char *)0 ) { ++ ++ comment = strchr(module, '#'); ++ if (comment != 0) *comment = '\0'; ++ comment = strchr(module, '\n'); ++ if (comment != 0) *comment = '\0'; ++ size = strlen(module); ++ if (size < 2) continue; ++ strcat (module , " \0"); ++ strcpy(blacklist[n] , module); ++ n++; ++ if ( n == 200 ) break; ++ //printf(module); ++ } ++ blacklistsize = n; ++ } ++} + #endif + + /* If a conflicting module in a row is already loaded, the new module will not be probed anymore */ +@@ -412,7 +438,7 @@ + pid_t mpid; + if((m==NULL)||(!strcmp("unknown",m))||(!strcmp("ignore",m))) return 0; + #ifdef BLACKLIST +- for(i=0;i<(sizeof(blacklist)/sizeof(char*));i++) ++ for(i=0;i < blacklistsize;i++) + { + if(!strcmp(blacklist[i],m)) + { +@@ -638,5 +664,8 @@ + /* Allow SIGTERM, SIGINT: rmmod depends on this. */ + signal(SIGTERM,SIG_DFL); signal(SIGINT,SIG_DFL); + signal(SIGALRM,alarm_handler); alarm(MAX_TIME); ++#ifdef BLACKLIST ++ gen_blacklist(); ++#endif + return hw_setup(dc,verbose,probeonly,skip); + } diff --git a/sys-apps/hwsetup/files/hwsetup-1.2-fastprobe.patch b/sys-apps/hwsetup/files/hwsetup-1.2-fastprobe.patch new file mode 100644 index 000000000000..0122a6aee8e7 --- /dev/null +++ b/sys-apps/hwsetup/files/hwsetup-1.2-fastprobe.patch @@ -0,0 +1,75 @@ +diff -urN hwsetup-1.2.dyn_blacklist/hwsetup.c hwsetup-1.2/hwsetup.c +--- hwsetup-1.2.dyn_blacklist/hwsetup.c 2005-11-17 14:20:14.000000000 -0500 ++++ hwsetup-1.2/hwsetup.c 2005-11-17 14:24:54.000000000 -0500 +@@ -140,14 +140,15 @@ + + int syntax(char *option) + { +- printf(VERSION); ++ puts(VERSION); + if(option) fprintf(stderr,"hwsetup: Unknown option '%s'\n\n",option); +- printf("Usage: hwsetup\n" +- " -v be verbose\n" +- " -p print rotating prompt\n" +- " -a ignore audio devices\n" +- " -s ignore scsi controllers\n" +- " -n probe only, don't configure anything.\n"); ++ puts("Usage: hwsetup\n" ++ "\t\t-v\tbe verbose\n" ++ "\t\t-p\tprint rotating prompt\n" ++ "\t\t-a\tignore audio devices\n" ++ "\t\t-s\tignore scsi controllers\n" ++ "\t\t-n\tprobe only, don't configure anything.\n" ++ "\t\t-f\trun a fast probe."); + return option?1:0; + } + +@@ -425,7 +426,7 @@ + { + signal(SIGALRM,SIG_IGN); + fprintf(stderr,"\nWARNING: Autodetection seems to hang,\n" +- "please check your computers BIOS settings.\n"); ++ "please check your computer's BIOS settings.\n"); + fflush(stderr); + if(wpid) { kill(wpid,SIGTERM); usleep(2500000); kill(wpid,SIGKILL); wpid=0; } + exit(1); /* exit program */ +@@ -591,12 +592,13 @@ + return 0; + } + +-int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip) ++int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip, int fastprobe) + { + int i,mouse=0,cdrom=0,modem=0,scanner=0; ++ int probeopt=fastprobe?PROBE_SAFE:PROBE_ALL; + struct device **currentDevs, *d, *serialmouse=NULL, *usbmouse=NULL; + if(verbose&VERBOSE_PROMPT) wpid=startwheel(); +- currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL); ++ currentDevs=probeDevices(dc,BUS_UNSPEC,probeopt); + if(verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); } + if(currentDevs==NULL) return -1; + check_proc_modules(); /* Get currently loaded module list */ +@@ -650,7 +652,7 @@ + + int main(int argc, char **argv) + { +- int i, verbose=0, probeonly=0, skip=0; ++ int i, verbose=0, probeonly=0, skip=0, fast=0; + enum deviceClass dc=CLASS_UNSPEC; + for(i=1;i<argc;i++) + { +@@ -659,6 +661,7 @@ + else if(!strcasecmp(argv[i],"-a")) skip|=SKIP_AUDIO; + else if(!strcasecmp(argv[i],"-s")) skip|=SKIP_SCSI; + else if(!strcasecmp(argv[i],"-n")) probeonly=1; ++ else if(!strcasecmp(argv[i],"-f")) fast=1; + else return syntax(argv[i]); + } + /* Allow SIGTERM, SIGINT: rmmod depends on this. */ +@@ -667,5 +670,5 @@ + #ifdef BLACKLIST + gen_blacklist(); + #endif +- return hw_setup(dc,verbose,probeonly,skip); ++ return hw_setup(dc,verbose,probeonly,skip,fast); + } diff --git a/sys-apps/hwsetup/files/hwsetup-1.2-gentoo.patch b/sys-apps/hwsetup/files/hwsetup-1.2-gentoo.patch new file mode 100644 index 000000000000..2cd8597a2cc9 --- /dev/null +++ b/sys-apps/hwsetup/files/hwsetup-1.2-gentoo.patch @@ -0,0 +1,41 @@ +diff -urN hwsetup-1.2.orig/hwsetup.c hwsetup-1.2/hwsetup.c +--- hwsetup-1.2.orig/hwsetup.c 2005-12-06 08:42:39.000000000 -0500 ++++ hwsetup-1.2/hwsetup.c 2005-12-06 08:42:18.000000000 -0500 +@@ -23,14 +23,15 @@ + #endif + + #define VERSION "HWSETUP 1.2, an automatic hardware configuration tool\n" \ +- "(C) 2006 Klaus Knopper <knoppix@knopper.net>\n\n" ++ "(C) 2006 Klaus Knopper <knoppix@knopper.net>\n" \ ++ "Modified for Gentoo Linux\n\n" + + #define CARDSDB "/usr/share/hwdata/Cards" +-#define XPATH "/usr/X11R6/bin/" +-#define XMODPATH "/usr/X11R6/lib/modules/drivers/" ++#define XPATH "/usr/bin/" ++#define XMODPATH "/usr/lib/xorg/modules/drivers/" + + #define VERBOSE_PRINT 1 +-#define VERBOSE_PROMPT 2 ++#define VERBOSE_PROMPT 0 + + #define SKIP_AUDIO 1 + #define SKIP_SCSI 2 +@@ -255,7 +256,7 @@ + char xmodule[32]; + char fullpath[128]; + sscanf(&buffer[7],"%31s",xmodule); +- sprintf(fullpath,XMODPATH"%.31s_drv.o",xmodule); ++ sprintf(fullpath,XMODPATH"%.31s_drv.so",xmodule); + if(exists(fullpath)) + { + strncpy(xi.xmodule,xmodule,sizeof(xi.xmodule)); +@@ -517,7 +518,7 @@ + int writeconfig(char *name,struct device *d,int verbose) + { + FILE *f,*k; +- const char *kconfig="/etc/sysconfig/knoppix"; ++ const char *kconfig="/etc/sysconfig/gentoo"; + char *desc; + unlink(name); + if((f=fopen(name,"w"))==NULL) |