Re: Learning C Programming

2012-06-21 Thread Barry Miller
On Thu, Jun 21, 2012 at 11:09:49AM -0700, Bryan Irvine wrote:
 On Thu, Jun 21, 2012 at 10:55 AM, Amit Kulkarni amitk...@gmail.com wrote:
  ?Talk about learning C Programming and the KR book being a good one. ?Is
  this the book?
 
  http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628
 
  yes it is, and i am surprised it is ~ $50. it is such a small book.
 
 
 That does seem a little bit high.  I don't remember what I got mine
 for years ago.
 
 That being said, it is worth a pile of Learn C in num time books.  :-)

Back in 1988 I paid $28.  I should have coughed up $40 and gotten the
cloth-bound version direct from Prentice-Hall (free shipping if paid in
advance!). 

-- 
Barry



Re: Differences between www.openbsd.org and openbsd.org

2010-05-19 Thread Barry Miller
On Wed, May 19, 2010 at 10:16:54PM +0200, Ingo Schwarze wrote:
 [...]
 The server openbsd.org is actually cvs.openbsd.org,
 that is the main machine in Theo's basement.
 Nobody should ever use that one for anything.
 It has whatever data Theo sees fit for whatever
 purpose, sometimes for testing.
 
 Small wonder it is not up to date right now,
 Theo is not even in town.

There *is* one case in which users are specifically directed to this
machine:

The donors list was removed from the CD liner notes after 3.6.  From
3.7, up to and including 4.7, the liner notes have referred to

http://openbsd.org/donations.html#people

although in view of this thread, that's probably an oversight.  Or a
sign that donors are invited to visit Theo's basement.  I'm guessing
it's the former.

-- 
Barry



Re: /usr directory: a system or user place?

2010-05-01 Thread Barry Miller
On Sat, May 01, 2010 at 10:52:54PM +0200, Harrell wrote:

 Is usr an abbreviation of user? ... just for curiosity, what is
 the origin of this directory name?

Your question has already been answered, but in case you are looking
for documentation, here's Dennis Ritchie (as in KR C)in the 1978
(July-August) Bell System Technical Journal, pp. 1953-4:

  It is common for the totality of user files to be too voluminous
  for a given device.  It is then impossible for the directories of
  all users to be members of the same directory, say /usr.  Instead
  they must be split into groups, say /usr1 and /usr2;

And Steve Bourne (as in Bourne shell), same issue, p. 1981, referring
to user fred setting the $PATH environment variable:

  PATH=:/usr/fred/bin:/bin:/usr/bin

Finally, looking at our old 1984 SVR2 source distribution, it is
evident that the Bell Labs guys preferred abbreviations to acronyms.
The distributed root filesystem consisted of:

  bck bin etc dev lib stand tmp

The /usr filesystem contained (in cpio format!):

  adm bin catman games include lib lost+found mail news preserve
  pub spool tmp

Not until the top level of the source tape do we hit an acronym:

  cmd games head lib stand uts

where uts=Unix Time-sharing System, which I guess is hard to abbreviate;)

Yes, I know this is somewhat off-topic, but I think it's fascinating,
like, Why'd they call it 'awk'?  Now there's an acronym for you.

Today, hier(7) rules.

-- 
Barry



Re: Any Ethereal, Wireshark related software in 4.2 ports?

2007-11-11 Thread Barry Miller
On Sun, Nov 11, 2007 at 09:13:42PM +0530, Siju George wrote:
 Both
 
 http://www.wireshark.org/ and http://www.wireshark.org/
 
 are not found in ports. Could somebody recommend any softwarew in 4.2
 ports that has related functionality?
 
If you don't mind building wireshark yourself, one way you can run it
with limited privileges is:

1. install wireshark from sources
2. groupadd shark
3. chgrp shark /wherever/wireshark /dev/bpf*
4. chmod g+s,o-x /wherever/wireshark
5. chmod g+rw /dev/bpf*
6. use sudo to grant access to wireshark

Of course, if a bad guy _does_ get control of wireshark, he OWNS your
network, but at least you're not totally rooted.  Take your chances.

--Barry



Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread Barry Miller
On Sun, Nov 11, 2007 at 10:32:05PM +0100, ropers wrote:
 xterm -e telnet ${1##telnet://}
 
 When I click a telnet URL that does not specify a port, it works,
 xterm launches with telnet, which duly connects to the port.
 
 However, if I click a telnet URL that *does* specify a port, it does
 not work, xterm closes immediately. I've manually figured out that it
 throws the error message
 
 telnet: could not resolve mud.vhdev.com:1991/telnet: Name or service not known
 
 before closing.
 
 man telnet told me that telnet expects to be given the port number
 separated by a space, not divided by a colon.
 
 Currently, if I click on telnet://mud.vhdev.com:1991, telnet is called with
 
 telnet mud.vhdev.com:1991
 
 instead of
 
 telnet mud.vhdev.com 1991
 
 which would be correct.

I think maybe sed, not awk.  Try:

xterm -e telnet `echo ${1##telnet://}|sed -e 's/:/ /'`

(which assumes $1 is properly formed).

--Barry



Re: Marginal boot CD #1 in OpenBSD 4.2 sets

2007-10-29 Thread Barry Miller
On Mon, Oct 29, 2007 at 06:42:19PM +, Stuart Henderson wrote:
 On 2007/10/29 10:49, Austin Hook wrote:
  I understand that some people have experienced boot problems with CD #1 in
  the new 4.2 release set, mainly with older machines.
 [...]
 So, it may be worth someone with an affected machine trying to boot
 CD 2 and if the boot loader does start up, pause it (just hit space or
 something), swap to CD 1, and continue by typing 'boot'.

Worked for me. Thanks!  (Also you need to 'set image /4.2/i386/bsd.rd'.) 



Re: Problems booting 4.2 CD on two older machines.

2007-10-27 Thread Barry Miller
On Sat, Oct 27, 2007 at 07:01:04PM +0100, Edd Barrett wrote:
 A couple of friends have been wanting to try out OpenBSD 4.2 on their
 machines, but the 4.2 disk will not boot whereas the 4.1 disk will.
[...] 
 Has anyone else had problems booting the 4.2 CD? And is there a workaround?

I have the same problem.  My 4 year old i386 test box doesn't see it as
bootable (4.[01] CDs work fine).  The CD seems ok - no problem pulling
kernels, sets, and packages off it.  It boots on my newer machines, and
even on an ancient (ca. 1999) NetVista.  I haven't had any other issues
with the drive itself.

dmesg after manual upgrade on the no-boot box:

OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Celeron(R) CPU 1.70GHz (GenuineIntel 686-class) 1.70 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
real mem  = 259551232 (247MB)
avail mem = 243310592 (232MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/14/03, BIOS32 rev. 0 @ 0xfb2f0, SMBIOS 
rev. 2.2 @ 0xf0800 (34 entries)
bios0: vendor Phoenix Technologies, LTD version 6.00 PG date 06/14/2003
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf/0xdf84
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdeb0/192 (10 entries)
pcibios0: PCI Exclusive IRQs: 5 9 10 11
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371SB ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0xb000! 0xcc000/0x1800 0xce000/0x1800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82845G/GL rev 0x03
vga1 at pci0 dev 2 function 0 Intel 82845G/GL Video rev 0x03: aperture at 
0xe000, size 0x800
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x02: irq 5
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x02: irq 10
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x02: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x02: irq 9
usb0 at ehci0: USB revision 2.0
uhub0 at usb0: Intel EHCI root hub, rev 2.00/1.00, addr 1
ppb0 at pci0 dev 30 function 0 Intel 82801BA AGP rev 0x82
pci1 at ppb0 bus 1
fxp0 at pci1 dev 3 function 0 Intel 8255x rev 0x10, i82551: irq 11, address 
00:e0:81:52:b5:a9
inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4
fxp1 at pci1 dev 6 function 0 Intel 8255x rev 0x10, i82551: irq 10, address 
00:e0:81:52:b5:aa
inphy1 at fxp1 phy 1: i82555 10/100 PHY, rev. 4
ichpcib0 at pci0 dev 31 function 0 Intel 82801DB LPC rev 0x02: 24-bit timer 
at 3579545Hz
pciide0 at pci0 dev 31 function 1 Intel 82801DB IDE rev 0x02: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: ST380011A
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd1 at pciide0 channel 0 drive 1: SAMSUNG HD300LD
wd1: 16-sector PIO, LBA48, 286168MB, 586072368 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 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: TEAC, CD-224E, 1.9A SCSI0 5/cdrom removable
cd0(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x02: irq 5
iic0 at ichiic0
it8712 at iic0 addr 0x2d not configured
iic0: addr 0x2d 00=11 01=10 02=00 03=07 04=00 05=00 06=00 07=00 08=00 09=00 
0a=1f 0b=5b 0c=6a 0d=18 0f=13 13=70 14=00 15=00 16=00 17=00 18=6a 19=6a 1a=6a 
1b=6a 1c=6a 1d=6a 1e=6a 1f=6a 20=6a 21=5d 22=cf 23=c1 24=b8 25=3b 26=47 27=b7 
29=16 2a=30 2b=2e 2c=6a 2d=6a 2e=6a 2f=6a 48=2d 51=1c 52=7f 53=7f 54=7f 58=90 
59=78 5a=fd 5b=12 5c=80 5d=00 5e=00 5f=00 60=7f 61=7f 62=7f 63=7f 64=7f 65=00 
66=00 67=00 68=7f 69=7f 6a=7f 6b=7f 6c=7f 6d=00 6e=00 6f=00 70=7f 71=7f 72=7f 
73=7f 74=00 75=00 76=00 77=00 80=11 81=10 82=00 83=00 84=00 85=00 86=00 87=00 
88=00 89=00 8a=1f 8b=5b 8c=6a 8d=18 8f=13 93=70 94=00 95=00 96=00 97=00 98=6a 
99=6a 9a=6a 9b=6a 9c=6a 9d=6a 9e=6a 9f=6a a0=6a a1=5d a2=cf a3=c1 a4=b7 a5=39 
a6=49 a7=b7 a9=16 aa=30 ab=2e ac=6a ad=6a ae=6a af=6a c8=2d d1=1c d2=7f d3=7f 
d4=7f d8=90 d9=78 da=fd db=12 dc=80 dd=00 de=00 df=00 e0=7f e1=7f e2=7f e3=7f 
e4=7f e5=00 e6=00 e7=00 e8=7f e9=7f ea=7f eb=7f ec=7f ed=00 ee=00 ef=00 f0=7f 
f1=7f f2=7f f3=7f f4=00 f5=00 f6=00 f7=00: it8712
usb1 at uhci0: USB revision 1.0
uhub1 at usb1: Intel UHCI root hub, rev 1.00/1.00, addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2: Intel UHCI root hub, rev 1.00/1.00, addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3: Intel UHCI root hub, rev 1.00/1.00, addr 1
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: 

Re: Problems booting 4.2 CD on two older machines.

2007-10-27 Thread Barry Miller
On Sat, Oct 27, 2007 at 07:01:04PM +0100, Edd Barrett wrote:
 
 Has anyone else had problems booting the 4.2 CD?
 
Here's another can read the CD but not boot from it machine:

OpenBSD 4.1 (GENERIC) #1435: Sat Mar 10 19:07:45 MST 2007
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III (GenuineIntel 686-class) 934 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,SER,MMX,FXSR,SSE
real mem  = 1073311744 (1048156K)
avail mem = 971960320 (949180K)
using 4278 buffers containing 53788672 bytes (52528K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+ BIOS, date 08/29/01, BIOS32 rev. 0 @ 0xfb3b0, SMBIOS 
rev. 2.2 @ 0xf0800 (46 entries)
bios0: VIA Technologies, Inc. VT82C694X
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf/0xdd94
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdcf0/160 (8 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11
pcibios0: PCI Interrupt Router at 000:07:0 (VIA VT82C596A ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8000 0xcc000/0x800 0xcd000/0x800 0xce000/0x800 
0xcf000/0x800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 VIA VT82C691 PCI rev 0xc4
ppb0 at pci0 dev 1 function 0 VIA VT82C598 AGP rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Mach64 GM rev 0x27
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 VIA VT82C686 ISA rev 0x40
pciide0 at pci0 dev 7 function 1 VIA VT82C571 IDE rev 0x06: ATA100, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: MAXTOR 6L060J3
wd0: 16-sector PIO, LBA, 57259MB, 117266688 sectors
wd0(pciide0:0:0): 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: MITSUMI, CD-ROM FX4831T!A, R02G SCSI0 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 7 function 2 VIA VT83C572 USB rev 0x1a: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 7 function 3 VIA VT83C572 USB rev 0x1a: irq 11
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
viaenv0 at pci0 dev 7 function 4 VIA VT82C686 SMBus rev 0x40
xl0 at pci0 dev 8 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 11, address 
00:04:75:ad:65:c7
exphy0 at xl0 phy 24: 3Com internal media interface
xl1 at pci0 dev 10 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 5, address 
00:04:75:ad:5d:ac
exphy1 at xl1 phy 24: 3Com internal media interface
xl2 at pci0 dev 11 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 10, 
address 00:04:75:80:bb:9e
exphy2 at xl2 phy 24: 3Com internal media interface
xl3 at pci0 dev 12 function 0 3Com 3c905C 100Base-TX rev 0x78: irq 11, 
address 00:04:75:ad:5d:10
exphy3 at xl3 phy 24: 3Com internal media interface
isa0 at pcib0
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
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask eb5d netmask ef7d 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



Re: Problems booting 4.2 CD on two older machines.

2007-10-27 Thread Barry Miller
On Sat, Oct 27, 2007 at 05:51:25PM -0700, kim wrote:

 When the CD that I burned booted up, I got a message at boot: 
 /etc/boot.conf too large

But that came from cdboot, right?  I don't think the rest of us in this
thread are getting that far.