wondering about makes.SILENT
Hi, I've just played with make and the .SILENT: target. Normally this suppress echoing the command as expected. But some special targets like .BEGIN, .END and .INTERRUPT seams to ignore it. Reading the code I've seen this kind of silence is set in Job_CheckCommands(). But this routine will only be called for normal targets. Can someone explain me if there is a way to make even the special targets less verbose? Thx, Dag
ioapic with single core kernel?
Hi, I was playing around a long time to get CardBus and sound working on my JVC MP-XP741. I've found, that the GENERIC.MP kernel support both if enableing acpi. To my poor mind, it seems that ioapic is needed, but simply adding it to the GENERIG confiuration file doesn't work. Since sysctl - hw.setperf disappears in the mp-kernel regardless using acpi or not, I'd like to add ioapic to the GENERIC kernel. Are there any sugestions? Thx and regards Dag Leine OpenBSD 4.1 (GENERIC) #4: Sat Sep 22 11:00:34 CEST 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Pentium(R) M processor 1.10GHz (GenuineIntel 686-class) 1.11 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2 real mem = 795701248 (777052K) avail mem = 717955072 (701128K) using 4278 buffers containing 39907328 bytes (38972K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 10/26/04, SMBIOS rev. 2.3 @ 0xf9960 (37 entries) bios0: JVC J2NE apm0 at bios0: Power Management spec V1.2 apm0: AC on, no battery apm0: flags 30102 dobusy 0 doidle 1 pcibios at bios0 function 0x1a not configured bios0: ROM list: 0xc/0xd000! 0xcd000/0x1800 0xce800/0x8800 acpi at mainbus0 not configured cpu0 at mainbus0 cpu0: Enhanced SpeedStep 1100 MHz (940 mV): speeds: 1100, 1000, 900, 800, 600 MHz pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 Intel 82852GM Hub-PCI rev 0x02 Intel 82852GM Memory rev 0x02 at pci0 dev 0 function 1 not configured Intel 82852GM Configuration rev 0x02 at pci0 dev 0 function 3 not configured vga1 at pci0 dev 2 function 0 Intel 82852GM AGP rev 0x02: aperture at 0xf000, size 0x800 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) Intel 82852GM AGP rev 0x02 at pci0 dev 2 function 1 not configured uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x03: irq 5 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x03: irq 4 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x03: irq 7 usb2 at uhci2: USB revision 1.0 uhub2 at usb2 uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x03: irq 3 usb3 at ehci0: USB revision 2.0 uhub3 at usb3 uhub3: Intel EHCI root hub, rev 2.00/1.00, addr 1 uhub3: 6 ports with 6 removable, self powered ppb0 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x83 pci1 at ppb0 bus 1 cbb0 at pci1 dev 3 function 0 Ricoh 5C475 CardBus rev 0xb8pci_intr_map: no mapping for pin A : couldn't map interrupt Ricoh 5C551 Firewire rev 0x00 at pci1 dev 3 function 1 not configured iwi0 at pci1 dev 5 function 0 Intel PRO/Wireless 2200BG rev 0x05: irq 7, address 00:0e:35:c3:a9:f7 fxp0 at pci1 dev 8 function 0 Intel 82801DB LAN rev 0x83, i82562: irq 5, address 00:80:88:23:02:e8 inphy0 at fxp0 phy 1: i82562EM 10/100 PHY, rev. 0 ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x03 pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x03: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: TOSHIBA MK1233GAS wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 pciide0: channel 1 ignored (disabled) auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x03pci_intr_map: no mapping for pin B Intel 82801DB Modem rev 0x03 at pci0 dev 31 function 6 not configured isa0 at ichpcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: PC speaker spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 biomask effd netmask effd ttymask pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support dkcsum: wd0 matches BIOS drive 0x80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 OpenBSD 4.1 (GENERIC.MP) #0: Wed Sep 19 13:47:11 CEST 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP cpu0: Intel(R) Pentium(R) M processor 1.10GHz (GenuineIntel 686-class) 1.11 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,SBF,EST,TM2 real mem = 795701248 (777052K) avail mem = 717893632 (701068K) using 4278 buffers containing 39907328 bytes (38972K) of memory User Kernel Config UKC enable api\^H \^H\^H \^Hcpi 388 acpi0 enabled UKC disable apm 298 apm0
umts cell phone as modem
Hi, I'm trying to use the SAMSUNG SHG-L760 over usb as modem. OpenBSD recognise it as umodem0 (dmesg attached) and assigns ucom0. First of all I want to have a 'AT OK' sequence. I've tryed echo and cat as well as a small perl script sending 'AT\r\n' to /dev/cuaU0 and read from it. While sending seams to work, there is no answer from the cell phone. Please can anyone give me a hint how to get the communication workin? (The cell phone is ok, under Windows I can talk to it with an teminal client an com4) regards Dag Leine OpenBSD 4.1 (GENERIC) #1435: Sat Mar 10 19:07:45 MST 2007 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Pentium(R) 4 CPU 2.80GHz (GenuineIntel 686-class) 2.80 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR real mem = 536113152 (523548K) avail mem = 481468416 (470184K) using 4278 buffers containing 26931200 bytes (26300K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 02/17/05, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.3 @ 0xf04b0 (66 entries) bios0: ASUSTeK Computer Inc. P4P800SE apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xf/0x1 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf5ce0/256 (14 entries) pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82801EB/ER LPC rev 0x00) pcibios0: PCI bus #3 is the last bus bios0: ROM list: 0xc/0x8800 acpi at mainbus0 not configured cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 Intel 82865G/PE/P CPU-I/0-1 rev 0x02 ppb0 at pci0 dev 1 function 0 Intel 82865G/PE/P CPU-AGP rev 0x02 pci1 at ppb0 bus 1 uhci0 at pci0 dev 29 function 0 Intel 82801EB/ER USB rev 0x02: irq 11 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1 at pci0 dev 29 function 1 Intel 82801EB/ER USB rev 0x02: irq 3 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2 at pci0 dev 29 function 2 Intel 82801EB/ER USB rev 0x02: irq 5 usb2 at uhci2: USB revision 1.0 uhub2 at usb2 uhub2: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered uhci3 at pci0 dev 29 function 3 Intel 82801EB/ER USB rev 0x02: irq 11 usb3 at uhci3: USB revision 1.0 uhub3 at usb3 uhub3: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub3: 2 ports with 2 removable, self powered ehci0 at pci0 dev 29 function 7 Intel 82801EB/ER USB2 rev 0x02: irq 10 usb4 at ehci0: USB revision 2.0 uhub4 at usb4 uhub4: Intel EHCI root hub, rev 2.00/1.00, addr 1 uhub4: 8 ports with 8 removable, self powered ppb1 at pci0 dev 30 function 0 Intel 82801BA AGP rev 0xc2 pci2 at ppb1 bus 2 skc0 at pci2 dev 5 function 0 Marvell Yukon 88E8001/8003/8010 rev 0x13, Yukon Lite (0x9): irq 5 sk0 at skc0 port A, address 00:13:d4:32:d9:96 eephy0 at sk0 phy 0: Marvell 88E1011 Gigabit PHY, rev. 5 ppb2 at pci2 dev 9 function 0 Hint HB6 PCI-PCI rev 0x12 pci3 at ppb2 bus 3 vga1 at pci3 dev 0 function 0 Matrox MGA G400/G450 AGP rev 0x82 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) ichpcib0 at pci0 dev 31 function 0 Intel 82801EB/ER LPC rev 0x02 pciide0 at pci0 dev 31 function 1 Intel 82801EB/ER IDE rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: WDC WD200BB-00DEA0 wd0: 16-sector PIO, LBA, 19092MB, 39102336 sectors wd1 at pciide0 channel 0 drive 1: SAMSUNG SP0802N wd1: 16-sector PIO, LBA48, 76351MB, 156368016 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: _NEC, DVD_RW ND-2510A, 2.15 SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 ichiic0 at pci0 dev 31 function 3 Intel 82801EB/ER SMBus rev 0x02: irq 5 iic0 at ichiic0 auich0 at pci0 dev 31 function 5 Intel 82801EB/ER AC97 rev 0x02: irq 5, ICH5 AC97 ac97: codec id 0x41445375 (Analog Devices AD1985) ac97: codec features headphone, 20 bit DAC, No 3D Stereo audio0 at auich0 isa0 at ichpcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pmsi0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pmsi0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: PC speaker spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 lm0 at isa0 port 0x290/8: W83627THF npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 fd0 at fdc0 drive 0: 1.44MB 80 cyl
fdisk - print units
Hi, sometimes I'm simply looking for the size (e.g. in GB) of the slices of an i386 Harddisk. I can get it using the fdisk(8) inline editor with 'p g' but I haven't found how do get it without starting the editor, so I've pached fdisk. Maybe someone is interested in the patch or have a comment on it, so here it is. (The patch applies for OpenBSD 4.1) Regards Dag sbin/fdisk//fdisk.8.orig -- sbin/fdisk//fdisk.8 --- sbin/fdisk//fdisk.8.origWed Feb 14 19:06:53 2007 +++ sbin/fdisk//fdisk.8 Sun Jun 3 13:24:46 2007 @@ -38,6 +38,7 @@ .Fl s Ar sectors .Oc .Op Fl f Ar mbrfile +.Op Fl p Ar unit .Ar device .Sh DESCRIPTION On the i386 and other architectures, sector 0 of a bootable hard disk @@ -106,6 +107,19 @@ MBR partition spanning from cylinder 0, head 1, sector 1, and extending to the end of the disk. This mode is designed to initialize the MBR the very first time. +.It Fl p Ar unit +Specifies the unit in which the size of slices should be shown. Legal +values are +.Ql \b +(Bytes) +.Ql \K +(Kilobytes) +.Ql \M +(Megabytes) and +.Ql \G +(Gigabytes). If +.Fl p +is omitted the everything is printet in Sectors. .It Fl u Update MBR bootcode, preserving existing MBR partition table. The MBR bootcode extends from offset 0x000 to the start of the MBR partition table sbin/fdisk//fdisk.c.orig -- sbin/fdisk//fdisk.c --- sbin/fdisk//fdisk.c.origMon Nov 20 09:18:21 2006 +++ sbin/fdisk//fdisk.c Sun Jun 3 13:27:07 2007 @@ -56,6 +56,7 @@ \t-e: edit MBRs on disk interactively\n \t-f: specify non-standard MBR template\n \t-chs: specify disk geometry\n +\t-p: specify units\n \t-y: do not ask questions\n `disk' may be of the forms: sd0 or /dev/rsd0c.\n, __progname); @@ -79,8 +80,9 @@ #endif mbr_t mbr; char mbr_buf[DEV_BSIZE]; + char *unit=NULL; - while ((ch = getopt(argc, argv, ieuf:c:h:s:y)) != -1) { + while ((ch = getopt(argc, argv, ieuf:c:h:s:p:)) != -1) { const char *errstr; switch(ch) { @@ -115,6 +117,9 @@ case 'y': y_flag = 1; break; + case 'p': + unit = optarg; + break; default: usage(); } @@ -151,7 +156,7 @@ /* Print out current MBRs on disk */ if ((i_flag + u_flag + m_flag) == 0) - exit(USER_print_disk(disk)); + exit(USER_print_disk(disk, unit)); /* Parse mbr template, to pass on later */ if (mbrfile != NULL (fd = open(mbrfile, O_RDONLY)) == -1) { sbin/fdisk//user.c.orig -- sbin/fdisk//user.c --- sbin/fdisk//user.c.orig Tue Aug 1 12:12:35 2006 +++ sbin/fdisk//user.c Sun Jun 3 13:24:46 2007 @@ -191,7 +191,7 @@ } int -USER_print_disk(disk_t *disk) +USER_print_disk(disk_t *disk, char *unit) { int fd, offset, firstoff, i; char mbr_buf[DEV_BSIZE]; @@ -200,14 +200,14 @@ fd = DISK_open(disk-name, O_RDONLY); offset = firstoff = 0; - DISK_printmetrics(disk, NULL); + DISK_printmetrics(disk, unit); do { MBR_read(fd, (off_t)offset, mbr_buf); MBR_parse(disk, mbr_buf, offset, firstoff, mbr); printf(Offset: %d\t, (int)offset); - MBR_print(mbr, NULL); + MBR_print(mbr, unit); /* Print out extended partitions too */ for (offset = i = 0; i 4; i++) sbin/fdisk//user.h.orig -- sbin/fdisk//user.h --- sbin/fdisk//user.h.orig Tue Jun 3 03:13:19 2003 +++ sbin/fdisk//user.h Sun Jun 3 13:24:46 2007 @@ -34,7 +34,7 @@ /* Prototypes */ int USER_init(disk_t *, mbr_t *, int); int USER_modify(disk_t *, mbr_t *, off_t, off_t); -int USER_print_disk(disk_t *); +int USER_print_disk(disk_t *, char *); #endif /* _USER_H */
Re: popen(2)
static struct pid { // ... } *pidlist; is defined at file scope (and static). It should be initialised to the default value 0 by the compiler. this I've not known until now Your testprogram also looks ok, are you sure this machine doesn't have a hardware problem? Tobias maybe the libc was corrupted, a reinstallation solved the problem Many Thanks Dag
popen(2)
Hallo, I've just played aroudn with the popen(2)-call. After getting a segmentation fault on a quite old OpenBSD 3.8 machine I've tried to understand the source. /usr/src/lib/libc/gen/popen.c what I am missing is the initialization of *pidlist. If I initialize this static pointer with NULL everything seems to work fine. Did I missunderstand the source or the usage of popen?? Thanks for Comments Dag The simple test programm (which dies only on ONE machine): #include stdio.h #include stdlib.h FILE *p; int main(void) { if(NULL == (p = popen(/bin/cat, w))) { printf(popen() failed\n); exit(1); } fprintf(p, hallo to pipe\n); printf(pclose exiting with %d\n, pclose(p)); return(0); }