Re: devd, crunchgen, C++, and /rescue

2003-01-02 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Tim Kientzle <[EMAIL PROTECTED]> writes: : devd.lo: In function `event_proc::~event_proc()': ... : This one has me stumped. Any ideas? I'm not. event_proc::~event_proc() is really one of the following: 0180 T event_proc::~event_proc [in-charge del

Re: devd, crunchgen, C++, and /rescue

2003-01-02 Thread Tim Kientzle
Tim Kientzle <[EMAIL PROTECTED]> writes: : Does anyone know how to get crunchgen to play nicely with C++ programs? M. Warner Losh asks: What's the problem. Using crunchgen directly gives the expected linkage problems: # cat test.conf srcdirs /usr/src/sbin progs devd libs -ll # crunchgen

key=value in rc.conf (was Re: Reading rc.conf from C programs?)

2003-01-02 Thread Andrew
On Thu, 2 Jan 2003, Terry Lambert wrote: > They're in the CVS repository. Do a "cvs diff -c" before and after > the code was added to the file, and you'll get my diffs. 8-). Perhaps the stuff at the bottom of defaults/rc.conf needs to be in a seperate file (like read_rc_conf.sh) with another

Re: freebsd running on a cdrom

2003-01-02 Thread Joe
Thanks, I looked at the ports/sysutils/cdroot/mkcdroot script and hacked togeather a boot.flp that worked. Only problem is that ssh does not work, but its a cd-rw so I'll have to change a few things. The boot went though okay, but now I gotta make changes so that it is console access and ssh on

MAKEDEV unknown major/minor devtype /dev/pst0s2b

2003-01-02 Thread elec
I am trying to install freebsd-4.7 stable on a promise sx6000 controller. Since the pst driver is not enabled on the kernel image i had to recompile the kernel to support it (kern.flp ) and also modified the mfsroot.gz to have /dev/pst0 entries. But when i am just about to install, sysinstall com

Re: Reading rc.conf from C programs?

2003-01-02 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Tim Kientzle <[EMAIL PROTECTED]> writes: : I'm trying to figure out how to read and use : /etc/rc.conf configuration variables from within : a C program. The standard technique, of course, : is to use a shell-script wrapper and pass the : extracted value

Re: devd, crunchgen, C++, and /rescue

2003-01-02 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]> Tim Kientzle <[EMAIL PROTECTED]> writes: : For now, this means that devd will not be in : /rescue. I'm not entirely happy about this. devd typically wouldn't be all that useful for a /rescue environment. : Policy question: Is C++ considered acceptable

Re: freebsd running on a cdrom

2003-01-02 Thread Matthew Saunders
Hello, I've been having the exact same problem. I've found a page that gives a more complete detail of bootable freebsd cd's, including how to supress the /stand/sysinstall invocation. http://www.zamaz.com/brian/firewall.html I haven't tried it yet, so I can't vouche for it, but if you read t

Re: freebsd running on a cdrom

2003-01-02 Thread Joe
Thanks, but that was actually one of the articles I had already read. It suggests taking the boot.flp image from 4.4-RELEASE and just using your own boot0, loader.4th and kernel.gz. When I did that I ended up with the system booting, but it complained about a missing something(I cannot remembe

Re: Reading rc.conf from C programs?

2003-01-02 Thread Greg Shenaut
In message <[EMAIL PROTECTED]>, Tim Kientzle cleopede: >Terry Lambert wrote: > >> Tim Kientzle wrote: >>>I'm trying to figure out how to read and use >>>/etc/rc.conf configuration variables from within >>>a C program. >> >> #!/bin/sh >> # Throw all of rc.conf into the environemnet so a

Re: Reading rc.conf from C programs?

2003-01-02 Thread Paul Schenkeveld
On Thu, Jan 02, 2003 at 03:16:54PM -0800, Tim Kientzle wrote: > Paul Schenkeveld wrote: > > > If people think that -q is a good option for printenv, I can come up > > with a patch for the standard printenv. Opinions? > > > Some form of unambiguous output from printenv > would be nice. I would

Re: freebsd running on a cdrom

2003-01-02 Thread Warren Block
On Thu, 2 Jan 2003, Joe wrote: > I've been trying to get FreeBSD to run off a cdrom. Why, > well longs story, the shot version is it needs to be able to be > turned off and on like a lite switch. (I understand the on part > will take longer, but the off is just hit the button). When I > rel

Re: freebsd running on a cdrom

2003-01-02 Thread Craig Rodrigues
On Thu, Jan 02, 2003 at 02:03:50PM -0800, Joe wrote: > Without building the entire FreeBSD distro how do I make my > own boot.flp file and what goes on it? See if this article can help you: "Building a CD Bootable Firewall" http://www.bsdtoday.com/2002/March/Features646.html -- Craig Rodrig

Re: Reading rc.conf from C programs?

2003-01-02 Thread Chad David
On Thu, Jan 02, 2003 at 03:25:01PM +0100, Miguel Mendez wrote: > On Wed, 1 Jan 2003 18:24:40 -0500 (EST) > Chuck Robey <[EMAIL PROTECTED]> wrote: > > Hi, > > Since my little baby was mentioned, I thought I'd just comment :) > > > > You could perhaps copy the way that "The Fish" does it? > > > >

Re: Reading rc.conf from C programs?

2003-01-02 Thread Tim Kientzle
Paul Schenkeveld wrote: If people think that -q is a good option for printenv, I can come up with a patch for the standard printenv. Opinions? Some form of unambiguous output from printenv would be nice. I would suggest quoting both the variable name and the value just to be on the safe side

Re: Reading rc.conf from C programs?

2003-01-02 Thread Tim Kientzle
So far, it sounds like noone has actually implemented a completely robust way to read rc.conf data into a shell program, although a lot of people have had good experiences with simple variable=value parsing of the raw files. PHK's idea (use 'set' to dump the shell vars before and after sourcing rc

Re: SCM_CREDS

2003-01-02 Thread Jim Faucette
> In the FreeBSD implimentation, the sender must attach a message of > type SCM_CREDS and the kernel will correctly fill in the fields. Thanks! That was the missing piece of the puzzle. jim... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the

Re: iicbb(4)/iic(4) debuging

2003-01-02 Thread Nicolas Souchu
On Tue, Dec 10, 2002 at 08:51:17PM +0100, Alexander Funcke wrote: > Hi, > > > I've more or less written a bus for GPIO kind of hardware and > a device-driver for National Geode's SCx200 GPIO pins. > > I'd like to connect the gpiobus(4) till the iicbb(4) 'device' > so I can talk to the lm-sensors

Re: Reading rc.conf from C programs?

2003-01-02 Thread Terry Lambert
Miguel Mendez wrote: > Terry Lambert <[EMAIL PROTECTED]> wrote: > > You are missing something. Someone violated policy, and put > > shell code into rc.conf, instead of leaving it a name/value > > pairs. > > So where are you patches? :-) Parsing rc.conf is not rocket science > anway. They're in t

freebsd running on a cdrom

2003-01-02 Thread Joe
Hello, I've been trying to get FreeBSD to run off a cdrom. Why, well longs story, the shot version is it needs to be able to be turned off and on like a lite switch. (I understand the on part will take longer, but the off is just hit the button). When I release this box it will have no cons

Re: Reading rc.conf from C programs?

2003-01-02 Thread Paul Schenkeveld
Hi all, On Thu, Jan 02, 2003 at 09:56:16PM +0100, [EMAIL PROTECTED] wrote: > In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wri > tes: > >Well, perhaps I'm missing something here, but can't you just tokenize the items > >in rc.conf using strtok after opening up the file in your C program? > >

Re: Reading rc.conf from C programs?

2003-01-02 Thread Jordan K Hubbard
You're somewhat mistaken if you think there was EVER any defined policy with respect to this, it was simply a shell configuration file that gained prominance as it went along, from its humble beginnings as /etc/sysconfig or whatever it was we called it back then. There was never any specific m

Re: pw(8): $ (dollar sign) in username

2003-01-02 Thread Richard Sharpe
On Thu, 2 Jan 2003, Terry Lambert wrote: > Mahlon wrote: > > This has come up more than a few times in the past. vipw does allow > > the $ character, and works great in a 'couple of machines' network. > > It's not a viable solution for using samba's machine trust accounts > > in an *automated* en

Re: Reading rc.conf from C programs?

2003-01-02 Thread Miguel Mendez
On Thu, 02 Jan 2003 13:35:03 -0800 Terry Lambert <[EMAIL PROTECTED]> wrote: Hi, > You are missing something. Someone violated policy, and put > shell code into rc.conf, instead of leaving it a name/value > pairs. So where are you patches? :-) Parsing rc.conf is not rocket science anway. Cheers

Re: Reading rc.conf from C programs?

2003-01-02 Thread Terry Lambert
[EMAIL PROTECTED] wrote: > Well, perhaps I'm missing something here, but can't you just tokenize the items > in rc.conf using strtok after opening up the file in your C program? You are missing something. Someone violated policy, and put shell code into rc.conf, instead of leaving it a name/value

Re: Reading rc.conf from C programs?

2003-01-02 Thread Terry Lambert
Tim Kientzle wrote: [ ... simple script ... ] > This doesn't work. /etc/rc.conf does not export > its variables to the environment. It only sets them in the > local shell. Try the above where 'fred' is >#!/bin/sh >printenv > and you'll see what I mean. Someone else has already pointed o

Re: pw(8): $ (dollar sign) in username

2003-01-02 Thread Terry Lambert
Mahlon wrote: > This has come up more than a few times in the past. vipw does allow > the $ character, and works great in a 'couple of machines' network. > It's not a viable solution for using samba's machine trust accounts > in an *automated* environment. Having to manually add your domain > tru

Re: Reading rc.conf from C programs?

2003-01-02 Thread Leo Bicknell
In a message written on Thu, Jan 02, 2003 at 12:18:55PM -0800, Tim Kientzle wrote: > rc.conf is _not_ a list of variable=value > pairs. It is a shell script that sets > a number of shell variables. Nothing > less than a full-fledged implementation > of /bin/sh is gauranteed to work in all > cases

Re: Reading rc.conf from C programs?

2003-01-02 Thread phk
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wri tes: >Well, perhaps I'm missing something here, but can't you just tokenize the items >in rc.conf using strtok after opening up the file in your C program? Only if you parse and evaluate the entire /bin/sh syntax. -- Poul-Henning Kamp

Re: Reading rc.conf from C programs?

2003-01-02 Thread wgrim
Oh, and changing a bit of what I said in my previous post, you could instead just pass the strtok to strlen I think and then rewind your file pointer. This should save some CPU cycles or at least save code complexity by doing it this way (in my mind at least). Anyway, just a couple thoughts.

Re: Reading rc.conf from C programs?

2003-01-02 Thread wgrim
Well, perhaps I'm missing something here, but can't you just tokenize the items in rc.conf using strtok after opening up the file in your C program? And char buffer sizes is a problem, you can record where the file pointer is, do you a strtok on say '=', subtract the new file pointer size with t

Re: Reading rc.conf from C programs?

2003-01-02 Thread phk
In message <[EMAIL PROTECTED]>, Tim Kientzle writes: >Terry Lambert wrote: > >> Tim Kientzle wrote: >>>I'm trying to figure out how to read and use >>>/etc/rc.conf configuration variables from within >>>a C program. >> >> #!/bin/sh >> # Throw all of rc.conf into the environemnet so a C

Re: Reading rc.conf from C programs?

2003-01-02 Thread Tim Kientzle
Terry Lambert wrote: Tim Kientzle wrote: I'm trying to figure out how to read and use /etc/rc.conf configuration variables from within a C program. #!/bin/sh # Throw all of rc.conf into the environemnet so a C program # named "fred" can read any of them with "getenv". . /etc/rc.conf fred

Re: pw(8): $ (dollar sign) in username

2003-01-02 Thread Mahlon
On Sun, Dec 29, 2002, Philip Reynolds wrote: > with a machine name of ``mname'' do: > > ``pw useradd mname'' > > then use ``vipw(8)'' to add the dollar. > > Simple as that. This is a known issue, however, some people like to > ignore it :) Tell that to the system administrator who wants to use

Kernel panic with ATA RAID

2003-01-02 Thread Sean Hamilton
Seems my toying with atacontrol caused a reproducable panic. I have a perl script which causes the panic right away every time, I'll mail that to anybody @freebsd.org that wants it. (Or is such paranoia unnecessary?) I believe everything else needed is here. sh --- Fatal trap 12: page fault whil

Re: FEC on 5.x

2003-01-02 Thread Attila Nagy
Hello, > do you have FEC working in an old version? i.e. do you have it working > in 4.x somewhere? Yes, I am using it on a box with two fxps. It is: FreeBSD 4.6-STABLE #2: Thu Jul 11 15:13:00 CEST 2002 > if so, can you show a tcpdump of it1 running and a tcpdump of it NOT > running on 5.x? You

Re: Reading rc.conf from C programs?

2003-01-02 Thread Miguel Mendez
On Wed, 1 Jan 2003 18:24:40 -0500 (EST) Chuck Robey <[EMAIL PROTECTED]> wrote: Hi, Since my little baby was mentioned, I thought I'd just comment :) > > You could perhaps copy the way that "The Fish" does it? > > > > Take a look at "ports/sysutils/thefish". > > > > The "parser.c" code appears to

Re: Reading rc.conf from C programs?

2003-01-02 Thread Peter Pentchev
On Wed, Jan 01, 2003 at 06:00:39PM -0800, Greg Shenaut wrote: > In message <[EMAIL PROTECTED]>, Chuck Robey cleopede: > >On Thu, 2 Jan 2003, Matthew West wrote: > > > >> On Wed, Jan 01, 2003 at 01:51:57PM -0800, Tim Kientzle wrote: > >> > I'm trying to figure out how to read and use /etc/rc.conf >

Re: ATA RAID performance (numerous fs related questions)

2003-01-02 Thread Sean Hamilton
From: "Soeren Schmidt" <[EMAIL PROTECTED]> | Uhm, what kind of disks, stripesize etc are you using, without that info | noone can tell you why... Two Seagate 80GB 7200RPM drives each on their own ATA66 channel. They're not very fast, but they are quiet. Quick tests with dd show about 20 MB/s reads

Re: Timing with clock_gettime(2) (sysutils/clockspeed port)

2003-01-02 Thread Lev Walkin
Mario Sergio Fujikawa Ferreira wrote: #define timing_diffi(x,y) \ ( \ (double) ( ((x)->t.tv_sec - (y)->t.tv_sec) + \ (double) ( \ ((x)->t.tv_nsec - (double) (y)->t.tv_nsec) * 4294967296.0 / 1e9 \ ) \ ) \ ) [skip] printf("Avg getpid() time = %lld nsec\n", timing_diffi(&end,&start)

An amr dump problem (I guess)

2003-01-02 Thread Attila Nagy
Hello, I am trying to make crashdumps on FreeBSD 5.0, because I get panics very often. Here is what I do: ddb> panic panic: from debugger syncing disks, buffers remaining... done Uptime: 17m32s amr0: flushing cache...done Dumping 511 MB Dump failed writing header (19) Dump failed writing data

Re: ATA RAID performance

2003-01-02 Thread Gary Stanley
I have tried using both atacontrol and ccdconfig to create stripes and mirrors of various sizes, and have found that in all cases, read performance *decreased*. Have you formatted your filesystem to the correct fragment/blocksizes? This usually helps on raid controllers in conjunction with the

Re: ATA RAID performance

2003-01-02 Thread Soeren Schmidt
It seems Sean Hamilton wrote: > Greetings, > > I have tried using both atacontrol and ccdconfig to create stripes and > mirrors of various sizes, and have found that in all cases, read performance > *decreased*. Uhm, what kind of disks, stripesize etc are you using, without that info noone can te

ATA RAID performance

2003-01-02 Thread Sean Hamilton
Greetings, I have tried using both atacontrol and ccdconfig to create stripes and mirrors of various sizes, and have found that in all cases, read performance *decreased*. Is this typical? I have a Promise controller in another computer running Windows which sees a considerable performance increa