· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Booyo LiveCD/Berry Hwsetup

BooyoLiveCD/BerryHwsetup


현재 가장 좋은 방법은 rc.sysinit 와 kmodule 을 변경하는 방법이 최선인 듯함. kmodule 은 kudzu 를 변경하는 것이 좋을 듯함.(hwconf)

이것이 아니라, 서비스중 kudzu 를 대체하는 것이 보다 좋을 듯함.

int main(int argc, char **argv) {
int i, verbose=0, probeonly=0, skip=0; enum deviceClass dc=CLASS_UNSPEC;

/* Check Option */ for (i=1; i
if (!strcasecmp(argvi,"-v")) verbose|=VERBOSE_PRINT; else if(!strcasecmp(argvi,"-p")) verbose|=VERBOSE_PROMPT; else if(!strcasecmp(argvi,"-a")) skip|=SKIP_AUDIO; else if(!strcasecmp(argvi,"-s")) skip|=SKIP_SCSI; else if(!strcasecmp(argvi,"-n")) probeonly=1; else return syntax(argvi);
}

/* Allow SIGTERM, SIGINT: rmmod depends on this. */

return hw_setup(dc, verbose, probeonly, skip);
}

startwheel 필요없슴. checkConFile 필요없슴.

int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip) {
int i,mouse=0,cdrom=0,modem=0,scanner=0; struct device **currentDevs, *d, *serialmouse=NULL, *usbmouse=NULL;

/* wheel start !! */ if (verbose&VERBOSE_PROMPT) wpid=startwheel(); 화면에 디스플레이 시작. /* probe devices */ if ((currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL))==NULL) return -1;
kudzu 의 function call (디바이스 검색은 여기에서 수행됨) bus 의 유형에 따라 probeFunc 가 다름. PCI pciProbe SBUS sbusProbe USB usbProbe PSAUX psauxProbe SERIAL serialProbe PARALLEL parallelProbe SCSI scsiProbe IDE ideProbe KEYBOARD keyboardProbe DDC ddcProbe ISAPNP isapnpProbe MISC miscProbe PCMCIA firewireProbe ADB pcmciaProbe MACIO macioProbe VIO vioProbe S390 s390Probe
/* probe end !! */ 필요 없슴. if (verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); } 화면에 디스플레이 멈춤.

/* load and config */ for (i=0; (d=currentDevsi); i++) {
if (verbose&VERBOSE_PRINT) hw_info(d); 화면에 디스플레이. 이 부분을 hwconf 에 쓰는 것으로 고치는 것이 어떨까? if (!probeonly) {
#if defined(_i_wanna_build_this_crap_)
if (d->bus==BUS_ISAPNP && configure_isapnp(d, verbose)) continue;
아직 설정은 못하고, 화면에 출력만 함.
#endif
switch (d->type) { case CLASS_MOUSE:
/* Choose serial over PS2/USB mouse IF present */ /* For some reason, PS/2 ALWAYS detects a mouse */ if (d->bus==BUS_SERIAL) {
mouse=0; serialmouse=d;
} else if (d->bus==BUS_USB) {
/* Need usbdevfs for */ mouse=0; usbmouse=d; /* this to work */ load_mod(d->driver, verbose);
} else if (d->bus==BUS_PSAUX) {
load_mod("psmouse", verbose);
} 이 부분은 문제가 있슴. FC3 를 참조해야 함. 문제는 FC3 의 경우, 어디에서 모듈을 로드하는지 모르겠슴. if (!mouse) writeconfig("/etc/sysconfig/mouse", d, verbose); link_dev(d, "mouse", mouse++, verbose); break; 마우스 모듈을 올리고, etc/sysconfig/mouse 에 내용적고, 디바이스와 링크 만듬. udev 를 사용하므로 점검해야 함. 마우스가 안 잡히는 경우, 왜 그런지 점검 필요.
serial 인 경우와 usb 인 경우에만 /etc/sysconfig/mouse 에 적음.

            if l.device == "sunmouse":
                self.setMouse("sun", 0)
            elif l.bus == kudzu.BUS_PSAUX:
                if l.driver == "synaptics":
                    self.setMouse("synaptics", 0)
                elif l.driver == "msintellips/2":
                    self.setMouse("genericwheelps/2", 0)
                else:
                    self.setMouse("generic3ps/2",0)
            elif l.bus == kudzu.BUS_USB:
                if l.driver == "generic3usb" or l.driver == "mousedev":
                    self.setMouse("generic3usb", 0)
                elif l.driver == "genericusb":
                    self.setMouse("genericusb", 1)
            else:
                self.setMouse("generic", 1)

    mouseModels = {
        # (shortname: make, model, gpm protocol, X protocol, input protocol, device, emulate3)
        "ascii": (N_("ASCII"), N_("MieMouse (serial)"),
                  "ms3", "IntelliMouse", "ms3", "ttyS", 0),
        "generic": (N_("Generic"), N_("2 Button Mouse (serial)"),
                    "Microsoft", "Microsoft", "bare", "ttyS", 1),
        "generic3": (N_("Generic"), N_("3 Button Mouse (serial)"),
                     "Microsoft", "Microsoft", "ms", "ttyS", 0),
        "genericps/2": (N_("Generic"), N_("2 Button Mouse (PS/2)"),
                        "imps2", "IMPS/2", None, "input/mice", 1),
        "generic3ps/2": (N_("Generic"), N_("3 Button Mouse (PS/2)"),
                         "imps2", "IMPS/2", None, "input/mice", 0),
        "genericwheelps/2": (N_("Generic"), N_("Wheel Mouse (PS/2)"),
                             "imps2", "IMPS/2", None, "input/mice", 0),
        "genericusb": (N_("Generic"), N_("2 Button Mouse (USB)"),
                       "imps2", "IMPS/2", None, "input/mice", 1),
        "generic3usb": (N_("Generic"), N_("3 Button Mouse (USB)"),
                        "imps2", "IMPS/2", None, "input/mice", 0),
        "genericwheelusb": (N_("Generic"), N_("Wheel Mouse (USB)"),
                            "imps2", "IMPS/2", None, "input/mice", 0),
        "geniusnm": (N_("Genius"), N_("NetMouse (serial)"),
                     "ms3", "IntelliMouse", "ms3", "ttyS", 1),
        "thinking": (N_("Kensington"), N_("Thinking Mouse (serial)"),
                     "Microsoft", "ThinkingMouse", "bare", "ttyS", 1),
        "logitech": (N_("Logitech"), N_("C7 Mouse (serial, old C7 type)"),
                     "Logitech", "Logitech", "mman", "ttyS", 0),
        "logitechcc": (N_("Logitech"), N_("CC Series (serial)"),
                       "logim", "MouseMan", "mman", "ttyS", 0),
        "logimman": (N_("Logitech"), N_("MouseMan/FirstMouse (serial)"),
                     "MouseMan", "MouseMan", "mman", "ttyS", 0),
        "logimman+": (N_("Logitech"), N_("MouseMan+/FirstMouse+ (serial)"),
                      "pnp", "IntelliMouse", "ms3", "ttyS", 0),
        "microsoft": (N_("Microsoft"), N_("Compatible Mouse (serial)"),
                      "Microsoft", "Microsoft", "bare", "ttyS", 1),
        "msnew": (N_("Microsoft"), N_("Rev 2.1A or higher (serial)"),
                  "pnp", "Auto", "ms", "ttyS", 1),
        "msintelli": (N_("Microsoft"), N_("IntelliMouse (serial)"),
                      "ms3", "IntelliMouse", "ms3", "ttyS", 0),
        "mousesystems": (N_("Mouse Systems"), N_("Mouse (serial)"),
                         "MouseSystems", "MouseSystems", "msc", "ttyS", 1),
        "mmseries": (N_("MM"), N_("MM Series (serial)"),
                     "MMSeries", "MMSeries", "bare", "ttyS", 1),
        "mmhittab": (N_("MM"), N_("MM HitTablet (serial)"),
                     "MMHitTab", "MMHittab", "bare", "ttyS", 1),
        "none": ("No", "mouse" , "none", "none", None, None, 0),
        "sun": (N_("Sun"), N_("Mouse"), "sun", "sun", "sun", "sunmouse", 0),
        "synaptics": (N_("Synaptics"), N_("Synaptics Touchpad"),
                      "imps2", "IMPS/2", None, "input/mice", 1)
        }
case CLASS_CDROM:
if (d->bus==BUS_USB) load_mod(d->driver, verbose); link_dev(d, "cdrom", cdrom++, verbose); break; CDROM 이 usb 로 연결되어 있으면, 관련 모듈 올림. 링크 만듬.
case CLASS_MODEM:
if (d->bus==BUS_USB) load_mod(d->driver, verbose); link_dev(d, "modem", modem++, verbose); break;
case CLASS_SCANNER:
if (d->bus==BUS_USB) load_mod(d->driver, verbose); link_dev(d, "scanner", scanner++, verbose); break;
case CLASS_VIDEO:
writeconfig("/etc/sysconfig/xserver", d, verbose); break; /etc/sysconfig/xserver 에 쓰기만 함. xorg 또는 xfree86 이 모듈을 올리나?
case CLASS_AUDIO:
if (skip&SKIP_AUDIO) break; writeconfig("/etc/sysconfig/sound", d, verbose); load_mod(d->driver, verbose); break; /etc/sysconfig/sound 에 쓰고, 모듈 올림.
case CLASS_NETWORK:
writeconfig("/etc/sysconfig/netcard", d, verbose); load_mod(d->driver, verbose); break; /etc/sysconfig/netcard 에 쓰고 모듈 올림.
case CLASS_FLOPPY:
writeconfig("/etc/sysconfig/floppy", d, verbose); load_mod(d->driver, verbose); break;
case CLASS_KEYBOARD:
if (d->bus==BUS_USB) load_mod(d->driver, verbose); break;
case CLASS_CAPTURE: /* Just load the module for these */ case CLASS_SCSI:
if (skip&SKIP_SCSI) break;
case CLASS_OTHER: /* Yet unsupported or "guessed" devices in kudzu. Module probe may hang here. */ case CLASS_RAID:
load_mod(d->driver, verbose); break;
case CLASS_SOCKET:
/* yenta_socket or similar is handled by berry-autoconfig */
default:
/* do nothing */ break;
}
}
}

return 0;
}

MOUSE: SERIAL 인 경우는 모듈 로드 안함. usb 와 psaux 인 경우 모듈 로드
/etc/sysconfig/mouse 에 내용적고, link_dev
usb 로 연결되어 있는 경우만 , 관련 모듈 올림. link_dev
CDROM, MODEM, SCANNER

VIDEO: /etc/sysconfig/xserver 에 쓰기만 함. AUDIO: skip 옵션이 있으면 아무것도 안 함. 아니경우 /etc/sysconfig/sound 에 쓰고, 모듈 올림. NETWORK: /etc/sysconfig/netcard 에 쓰고 모듈 올림. FLOPPY: /etc/sysconfig/floppy 에 쓰고 모듈 올림. KEYBOARD: usb 로 연결되어 있는 경우만 , 모듈 올림. CAPTURE: bug 로 보임. SCSI 에 skip 옵션이 있으면, 모듈을 올리지 못 할 것 같음. SCSI: skip 옵션이 있으면 아무것도 안 함. 모듈 올림.

모듈만 올림.
OTHER, RAID

SOCKET: 아무것도 하지 않음.

int load_mod(char *m, int verbose) {
int pstatus,i; time_t now; pid_t mpid;

if ((m==NULL) || (!strcmp("unknown", m)) || (!strcmp("ignore", m))) return 0;
unknown 이거나 ignore 면 모듈 로드 못 함.

#ifdef BLACKLIST
for (i=0; i<(sizeof(blacklist)/sizeof(char*)); i++) {
if (!strcmp(blacklisti, m)) {
if (verbose&VERBOSE_PRINT) printf("not loading module %.32s (is in blacklist)\n", m); return 0;
}
}
#endif
blacklist 에 있는 것이면 모듈 로드 안 함. if ((mpid=fork())==0) {
/* Child process */ if (verbose&VERBOSE_PRINT) printf("modprobe(%.32s)\n", m); signal(SIGSEGV, segfault_handler);

/* Send modprobe errors to /dev/null */ if (!(verbose&VERBOSE_PRINT)) freopen("/dev/null", "w", stderr); //execl("/bin/echo", "echo", m, NULL); if (!strcmp("genericwheelusb", m)) { execl("/sbin/modprobe", "modprobe", "usbhid", NULL); exit(1); } genericwheelusb 가 아니면 usbhid 모듈 로드. execl("/sbin/modprobe", "modprobe", m, NULL); 모듈 로드 수행.

/* Error!! */ exit(1);
}

now=time(0); do {
usleep(125000); /* Delay 1/8s */

/* We SHOULD wait for modprobe to finish! */ if (waitpid(mpid, &pstatus, WNOHANG)) break;
} while ((time(0) - now) < MAX_TIME_MODULE);

return pstatus;
}

const char *blacklist[] = { "apm", "agpgart", "yenta_socket",
"i82092", "i82365", "tcic", "pcmcia_core", "ds", "ohci1394" };

int link_dev(struct device *d, char *target, int tnum, int verbose) {
const char devdir[]="/dev/"; if(d&&d->device)
{
char devname64, dstname64; sprintf(devname,"%s%.32s",devdir,d->device); sprintf(dstname,"%s%.32s",devdir,target); if(checkmoveup(dstname, tnum)) return -1; /* Read-only FS?! */ if(tnum>0) sprintf(dstname,"%s%.32s%1d",devdir,target,tnum); if(verbose&VERBOSE_PRINT) printf("symlink(%.32s,%.32s)\n",devname,dstname);
/* return symlink(devname,dstname);*/
return 0;
}
return -1;
} udev 와 관계 검토 필요. hwconf 에서 어떻게 하는지 볼 것.

hwconf.c

hwconf.c 가 main 이고 나머지는 전부 libkudzu.a 를 만드는 것임. quite 옵션만 필요함.

kudzu source package 에 포함되어 있슴.

int main(int argc, char **argv) {
char *confFile; char *debugFile=NULL; int runFirst=0; int ret; int rc; int x; char *bus = NULL, *class = NULL; enum deviceBus probeBus = BUS_UNSPEC; enum deviceClass probeClass = CLASS_UNSPEC; poptContext context; struct device **oldDevs, **newDevs; struct poptOption options[] = {
POPT_AUTOHELP { "quiet", 'q', POPT_ARG_NONE, &quiet, 0,
_("do configuration that doesn't require user input"), NULL
}, { "safe", 's', POPT_ARG_NONE, &safe, 0,
_("do only 'safe' probes that won't disturb hardware"), NULL
}, { "timeout", 't', POPT_ARG_INT, &timeout, 0,
_("set timeout in seconds"), NULL
}, { "probe", 'p', POPT_ARG_NONE, &probeonly, 0,
_("probe only, print information to stdout"),
NULL
}, { "bus", 'b', POPT_ARG_STRING, &bus, 0,
_("probe only the specified 'bus'"),
NULL
}, { "class", 'c', POPT_ARG_STRING, &class, 0,
_("probe only for the specified 'class'"),
NULL
}, { "file", 'f', POPT_ARG_STRING, &debugFile, 0,
_("read probed hardware from a file"), _("file to read hardware info from")
}, { "kernel", 'k', POPT_ARG_STRING, &kernel_ver, 0,
_("search for modules for a particular kernel version"),
_("kernel version")
}, { 0, 0, 0, 0, 0, 0 }
};

setlocale(LC_ALL, ""); bindtextdomain("kudzu", "/usr/share/locale"); textdomain("kudzu");

context = poptGetContext("kudzu", argc, (const char **)argv, options, 0); while ((rc = poptGetNextOpt(context)) > 0) { } if (( rc < -1)) {
fprintf(stderr, "%s: %s\n",
poptBadOption(context, POPT_BADOPTION_NOALIAS), poptStrerror(rc));
exit(-1);
}

if (getuid() && !probeonly) {
fprintf(stderr,
_("\nERROR - You must be root to run kudzu.\n"));
exit(1);
} 루트가 아닌 경우는 probe 만 할 수 있슴.

setupKernelVersion(); 없에고 다음으로 대체함. _module_file = "/etc/modprobe.conf";

if (!(confFile=checkConfFile())) {
runFirst=1;
} /etc/sysconfig/hwconf 가 없으면, runFirst=1; 이 부분만 수행하면 될 것 같음. if (bus) { 필요없슴.
for (x=0; busx; x++)
busx = toupper(busx);
for (x=0; busesx.string && strcmp(busesx.string,bus); x++); if (busesx.string)
probeBus = busesx.busType;
} 옵션에 -b 가 있는 경우. bus 옵션의 bus 명을 uppercase 로 바꾸고, 매치되는 bus struct 를 찾아 busType 를 저장.

if (class) { 필요없슴.
for (x=0; classx; x++)
classx = toupper(classx);
for (x=0; classesx.string && strcmp(classesx.string,class); x++); if (classesx.string)
probeClass = classesx.classType;
} 옵션에 -c 가 있는 경우. class 옵션의 class 명을 uppercase 로 바꾸고, 매치되는 class struct 를 찾아 classType 를 저장.

initializeBusDeviceList(probeBus); bus 의 initFunc 를 null 로 만듬. if (runFirst || probeonly) {
storedDevs = malloc(sizeof(struct device *)); storedDevs0 = NULL;
처음이거나 probeonly 면 storedDevs0 를 null 로 만듬. } else { 필요없슴.
storedDevs = readDevices(confFile); if (!storedDevs) {
storedDevs = malloc(sizeof(struct device *)); storedDevs0 = NULL;
}
/etc/sysconfig/hwconf 를 읽어 storeDevs 를 채움. hwconf 가 빈 파일이면 storedDevs0 를 null 로 만듬. }

while (storedDevsnumStored) numStored++; if (debugFile)
currentDevs = readDevices(debugFile);
else {
if (safe)
currentDevs = probeDevices(probeClass, probeBus, (PROBE_ALL|PROBE_SAFE));
else
currentDevs = probeDevices(probeClass, probeBus, PROBE_ALL);
} 실제로 하드웨어 검색하여 currentDevs 에 채움. if (!currentDevs) {
currentDevs = malloc(sizeof(struct device *)); currentDevs0 = NULL;
} currentDevs 가 없으면 currentDevs0 에 null. if (probeonly) { 필요없슴.
for (x=0; currentDevsx; x++)
currentDevsx->writeDevice(stdout, currentDevsx);
freeDeviceList(); exit(0);
} probeonly 면 화면에 출력 while (currentDevsnumCurrent) numCurrent++; 필요없슴. ret = listCompare(storedDevs, currentDevs, &oldDevs, &newDevs); 필요업슴. storedDevs 와 currentDevs 비교. freeDeviceList(); 필요없슴. if (!ret) { 필요업슴.
writeDevices(confFile,currentDevs); exit(0);
같은 경우인 것 같은데, 왜 다시 currentDevs 를 confFile 에 쓰는가? } else {
/* List-ify oldDevs, newDevs */ if (oldDevs0) {
oldDevs0->next=NULL; for (x=1;oldDevsx;x++)
oldDevsx-1->next = oldDevsx;
oldDevsx-1->next = NULL; oldDevsx-1->next = NULL;
} if (newDevs0) {
newDevs0->next = NULL; for (x=1;newDevsx;x++)
newDevsx-1->next = newDevsx;
newDevsx-1->next = NULL;
} configMenu((*oldDevs),(*newDevs),runFirst); 변경된 사항에 따라 메뉴 디스플레이. 이 부분을 채워야 함.
} if (!runFirst)
writeDevices(confFile,currentDevs); 초기 작업이 아니면 currentDevs 를 confFile 에 씀.
else
writeDevices("/etc/sysconfig/hwconf",currentDevs); 초기 작업이면 currentDevs 를 /etc/sysconfig/hwconf 에 씀.
newtFinished(); if (!access("/usr/bin/rhgb-client",X_OK) && rhgb) { 조사필요
system("/usr/bin/rhgb-client --details=no >/dev/null 2>&1");
} return 0;
}

configMenu void configMenu(struct device *oldDevs, struct device *newDevs, int runFirst) {
int y, z, rc; struct device *dev, *tmpdev; int defaction = -1; int mouseconfigured = 0;

/* First, make sure we have work to do... */ dev = oldDevs; for ( ; dev; dev=dev->next) {
if (isConfigurable(dev) & !(dev->bus == BUS_PCI && dev->type != CLASS_MODEM & (!strcmp(dev->driver, "ignore") ||
!strcmp(dev->driver, "disabled") || !strcmp(dev->driver, "unknown")))) {
if (!dev->detached) {
struct stat sbuf;

/* If the device only changed in the driver used, ignore it */ tmpdev = newDevs; for ( ; tmpdev ; tmpdev = tmpdev->next) {
if (tmpdev->compareDevice(tmpdev,dev) == 2) {
oldDevs = listRemove(oldDevs,dev); newDevs = listRemove(newDevs,tmpdev); continue;
}
} /* If they have a serial mouse, and GPM or RHGB is running,
  • it will disappear. */
if (dev->type == CLASS_MOUSE & dev->bus == BUS_SERIAL & (!stat("/dev/gpmctl",&sbuf) || safe ||
!access("/initrd/rhgb-socket",F_OK))) {
currentDevs = realloc(currentDevs,(numCurrent+2)*sizeof(struct device *)); currentDevsnumCurrent = dev; currentDevsnumCurrent+1 = NULL; numCurrent++;
} else
continue;
} else {
/* Add detached devices to current list */ currentDevs = realloc(currentDevs,(numCurrent+2)*sizeof(struct device *)); currentDevsnumCurrent = dev; currentDevsnumCurrent+1 = NULL; numCurrent++;
}
} oldDevs = listRemove(oldDevs, dev);
} for (y=0; currentDevsy; y++) {
if (currentDevsy->type == CLASS_MOUSE & isConfigured(currentDevsy)) {
mouseconfigured = 1; break;
}
} /* If a non-serial mouse got removed, ignore it */ dev = oldDevs; for ( ; dev; dev=dev->next) {
if (dev->type == CLASS_MOUSE && dev->bus != BUS_SERIAL) {
oldDevs = listRemove(oldDevs,dev);
}
} dev = newDevs; for ( ; dev; dev=dev->next) {
if (isConfigurable(dev) & !(dev->bus == BUS_PCI && dev->type != CLASS_MODEM & (!strcmp(dev->driver, "ignore") ||
!strcmp(dev->driver, "disabled") || !strcmp(dev->driver, "unknown"))) ) {
if (!runFirst || !isConfigured(dev)) {
switch (dev->type) {
case CLASS_NETWORK: case CLASS_SCSI: case CLASS_IDE: case CLASS_RAID: case CLASS_CAPTURE: case CLASS_AUDIO: case CLASS_USB: case CLASS_FIREWIRE: case CLASS_OTHER:
if (isAvailable(dev->driver))
continue;
break;
/* If we are running for the first time, and they
  • have a mouse that currently exists configured,
  • ignore any secondary mice. */
case CLASS_MOUSE:
if (mouseconfigured)
break;
continue;
default:
continue;
}

}
} newDevs = listRemove(newDevs, dev);
} if (!oldDevs && !newDevs)
return;

if (!quiet) {
startNewt(); showWelcome(timeout);
} dev = oldDevs; for ( ; dev ; dev = dev->next ) {
if (!quiet && defaction < 0)
rc = newtConfigMenu(_("Hardware Removed"),_("Remove Configuration"),
_("Keep Configuration"),_("Do Nothing"), _("The following %s has been removed from "
"your system:\n %s\n\n" "You can choose to:\n\n" "1) Remove any existing " "configuration for the device.\n" "2) Keep the existing configuration. " "You will not be prompted " "again if the device seems to be missing.\n" "3) Do nothing. The configuration will " "not be removed, but if the device is found missing on " "subsequent reboots, you will be prompted again."),
hwType(dev->type, dev->bus), dev->desc);
else
rc = defaction >= 0 ? defaction : 0;
switch (rc) {
case 0: case 3:
if (rc == 3) defaction = 0; unconfigure(dev); break;
case 1: case 2: case 4:
if (rc == 1 || rc == 4)
dev->detached = 1;
if (rc == 4)
defaction = 1;
currentDevs = realloc(currentDevs,(numCurrent+2)*sizeof(struct device *)); currentDevsnumCurrent = dev; currentDevsnumCurrent+1 = NULL; numCurrent++; break;
case 5:
newtFinished(); exit(0); break;
}
} dev = newDevs; for ( ; dev ; dev = dev->next) {
if (!quiet && defaction < 0)
rc = newtConfigMenu(_("Hardware Added"),_("Configure"),
_("Ignore"), _("Do Nothing"), _("The following %s has been added to "
"your system:\n %s\n\n" "You can choose to:\n\n" "1) Configure the device.\n" "2) Ignore the device. No configuration will " "be added, but you will not be prompted if " "the device is detected on subsequent reboots.\n" "3) Do nothing. No configuration will be " "added, and the device will show up as new if " "it is detected on subsequent reboots."),
hwType(dev->type, dev->bus), dev->desc);
else
rc = defaction >= 0 ? defaction : 0;
switch (rc) {
case 0: case 3:
if (rc == 3) defaction = 0; configure(dev); break;
case 1: case 4:
if (rc == 4) defaction = 1; break;
case 2:
y=0; while (currentDevsy) {
if (currentDevsy==dev) {
for (z=y;z
currentDevsz=currentDevsz+1;
numCurrent--; break;
} y++;
} break;
case 5:
newtFinished(); exit(0); break;
}
} if (configuredX >= 0) {
if (configuredX) {
close(open("/var/run/Xconfig-failed",O_CREAT|O_EXCL,0644));
} else {
close(open("/var/run/Xconfig",O_CREAT|O_EXCL,0644));
}
} if (removedMouse) {
int i; int fixedmouse = 0;

for (i=0; currentDevsi; i++) {
if (currentDevsi->type == CLASS_MOUSE & strcmp(currentDevsi->driver,"ignore")) {
configure(currentDevsi); fixedmouse = 1; break;
}
} if (!fixedmouse) {
close(open("/var/run/Xconfig-failed",O_CREAT|O_EXCL,0644));
}
}
}

isConfigurable isConfigured isAvailable

rc.sysinit and kmodule


rc.sysinit 에서 kmodule 을 call 한 후에 load_module 을 사용하여 로드함. 결국 hwconf 에서 모듈을 잘 assign 하면 될 것 같음.

ID
Password
Join
You will receive a legacy which will place you above want.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-03-08 04:50:43
Processing time 0.0256 sec