Re: unitialized memory is all zeros...why not garbage instead?

2005-06-13 Thread Dag-Erling Smørgrav
Mike Hunter <[EMAIL PROTECTED]> writes: > Is the pre-zeroing of malloc'd memory documented somewhere? By my reading > of the malloc manapge... malloc() does not pre-zero memory, but it hands you memory which has been pre-zeroed by the kernel unless you've used it before. Your test program makes

Re: unitialized memory is all zeros...why not garbage instead?

2005-06-11 Thread Dag-Erling Smørgrav
Mike Hunter <[EMAIL PROTECTED]> writes: > I have a feeling that I'm missing something really obvious, but I'm having > trouble understanding why the following program: > [...] > Never prints anything but "0"'s. Because the kernel always hands processes pre-zeroed pages. > I ran less up to my hw.p

Re: Determining disk device and kicking GEOM when doing automatic mounting of umass devices

2005-06-10 Thread Dag-Erling Smørgrav
"Darren Pilgrim" <[EMAIL PROTECTED]> writes: > So yeah I gueuss my fob is busted or funky. The CAM errors are "just" the > drive saying there's no media present, so maybe the device doesn't support > the commands necessary to report disk capacity? Is there a way to educate > CAM about this so the

Re: Determining disk device and kicking GEOM when doing automatic mounting of umass devices

2005-06-10 Thread Dag-Erling Smørgrav
"Darren Pilgrim" <[EMAIL PROTECTED]> writes: > Attached as named above. The logs show the da0 DISK class in the GEOM > config, but no MBR class entry. Take a closer look at geom-logs. It shows a slew of CAM errors. There's something wrong with your fob, or possibly (but not likely) with the USB

Re: Determining disk device and kicking GEOM when doing automatic mounting of umass devices

2005-06-09 Thread Dag-Erling Smørgrav
"Darren Pilgrim" <[EMAIL PROTECTED]> writes: > GEOM doesn't automatically read the partition table and create the > slice device [...] Yes, it does. When the umassX provider shows up, GEOM immediately tastes it and creates geoms for the individual slices. If it really doesn't on your system, try

Re: Bootable CDROM creation system

2005-06-08 Thread Dag-Erling Smørgrav
Chad David <[EMAIL PROTECTED]> writes: > My company built a tool a few years back for creating a bootable cdrom > based on a running host FreeBSD 3/4 system, which promptly got shelved and > forgotten.I recently had to update it for FreeBSD 5 and thought that > perhaps the community at large could

Re: Improving bind 9 for money

2005-05-26 Thread Dag-Erling Smørgrav
Attila Nagy <[EMAIL PROTECTED]> writes: > If I would have a given amount of money and I would like to make bind > 9 go faster (both in the terms of caching and authoritative > performance) on FreeBSD, could I find the appropriate people for the > job? Did you ask Nominum? DES -- Dag-Erling Smørg

Re: kgdb doesn't seem to work, says "Cannot read PTD"

2005-05-20 Thread Dag-Erling Smørgrav
"Aurel Bodenmann" <[EMAIL PROTECTED]> writes: > My FreeBSD box is giving me quite a hard time, it panics from time to > time (normally after a few days uptime), I suspect it has something > to do with this cheap SATA controller I'm using (Promise SATA150 > TX4). The SATA150 TX4 is not cheap, at le

/etc/rc.d/nfslocking

2005-05-01 Thread Dag-Erling Smørgrav
...only checks if nfs_server_enable *or* nfs_client_enable is true before trying to start rpc.statd and rpc.lockd; but rpc.lockd won't work if the nfsclient module compiled in or loaded. I can't make up my mind whether to hack rpc.lockd to kldload nfsclient, hack /etc/rc.d/nfslocking to require nf

Re: region code in cdrecord

2005-04-24 Thread Dag-Erling Smørgrav
Tim Kientzle <[EMAIL PROTECTED]> writes: > With cheap DVD players down to about $50, just buy another > player and set it to Region 2. Uhm, why would you rather have two players locked to different regions than a single unlocked player? DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED]

Re: region code in cdrecord

2005-04-24 Thread Dag-Erling Smørgrav
Chuck Robey <[EMAIL PROTECTED]> writes: > I am really doing rather well here; I got dvd copying to work via > 'k3b'. Now, I want to go for broke, and try for the one I've been > after for years, which is converting a region==2 dvd to a region==1 > dvd (Britain to US). I have a dvd taht you can't

Re: KLD module with C++ iostreams ?

2005-04-21 Thread Dag-Erling Smørgrav
Aziz KEZZOU <[EMAIL PROTECTED]> writes: > I am wondering if I can use c++ iostreams inside the kernel ? > After all the code : cout << "Hello world!" << endl; > ends accessing the stdout just like : printf("Hello world!\n"); right ? There is no stdio in the kernel. > So if I could compile my KLD

Re: NFS client/buffer cache deadlock

2005-04-21 Thread Dag-Erling Smørgrav
Marc Olzheim <[EMAIL PROTECTED]> writes: > Ah, I was reading the SUSv2 page: > > http://www.opengroup.org/onlinepubs/009695399/functions/write.html > > instead of the POSIX version. POSIX == SUSv3 these days. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED]

Re: gvinum during bootup

2005-04-21 Thread Dag-Erling Smørgrav
Rex Roof <[EMAIL PROTECTED]> writes: > I'm running a FreeBSD6 machine current as of a few days ago and I'm > working on a gvinum configuration, I couldn't find any place where it > referenced gvinum on startup so after fussing around with the rc > system a little, I wrote an /etc/rc.d/gvinum script

Re: kernel killing processes when out of swap

2005-04-12 Thread Dag-Erling Smørgrav
"Steven Hartland" <[EMAIL PROTECTED]> writes: > Thanks for the feedback seems very strange that sshd was the first thing the > kernel killed off; so unless it was actually at fault ( would be very strange > ) > it would have been one of the smallest not largest processes. > The box has runs severa

system identification

2005-04-07 Thread Dag-Erling Smørgrav
ISTR that there is a semi-standard way of obtaining the system (or motherboard) manufacturer and model from the BIOS or CMOS on PC clones, but all I can find right now is the BIOS copyright string starting at fe00:000e. Can anyone here refresh my memory? DES -- Dag-Erling Smørgrav - [EMAIL PROTE

Re: ICH6 SATA RAID support

2005-04-05 Thread Dag-Erling Smørgrav
Vladimir Terziev <[EMAIL PROTECTED]> writes: > could someone tell me what is the status of ICH6 SATA RAID support > in FreeBSD? The ICH6R is an Intel MatrixRAID chipset and is fully supported in -CURRENT. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED]

Re: ATA security commands, bug in atacontrol

2005-04-05 Thread Dag-Erling Smørgrav
Craig Boston <[EMAIL PROTECTED]> writes: > Um, wouldn't setting the password on a system in which the BIOS offers > no ATA security support render the system unbootable? The BIOS would > be unable to read the boot sector without first unlocking the disk... You are assuming that there is only one

Re: Kernel documentation and specification

2005-03-24 Thread Dag-Erling Smørgrav
"klowd9 -" <[EMAIL PROTECTED]> writes: > First of all i am dead serious about learning. Apparently not. > Secondly, where i come from, $60 is alot of money. And in the spirit > of open source and free software, charging $60 for a book is > ridiculous. I want to code free software and contribute t

Re: Kernel documentation and specification

2005-03-24 Thread Dag-Erling Smørgrav
Frank Mayhar <[EMAIL PROTECTED]> writes: > Um, well, actually for a reference work, that's a reasonable price. You > might be able to pick up a copy of the 4.4BSD demon book used, I guess. It would be nearly useless. The latest edition is well worth its price. DES -- Dag-Erling Smørgrav - [EMA

Re: NIC detected, but won't DHCP or configure

2005-03-23 Thread Dag-Erling Smørgrav
Andrew Robinson <[EMAIL PROTECTED]> writes: > re_probe(): vid 10ec did 8169 hwrev 1000 That's an 8169SB, which is supported in -CURRENT. Try the attached patch. I'll try to get it merged before 5.4-RELEASE. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] Index: sys/pci/if_rlreg.h =

Re: NIC detected, but won't DHCP or configure

2005-03-22 Thread Dag-Erling Smørgrav
"Daniel O'Connor" <[EMAIL PROTECTED]> writes: > On Tue, 22 Mar 2005 17:30, Andrew Robinson wrote: > > thanks for the suggestion! I tried that and it didn't seem to change > > anything: the relevant output of pciconf -lv is still > Try if_rl.ko/rl0 No, if_rl will not attach to 8169 cards. Andrew,

Re: What is this GEOM thing?

2005-03-15 Thread Dag-Erling Smørgrav
Stas Myasnikov <[EMAIL PROTECTED]> writes: > Can anyone tell me what is GEOM basically? I know that there's geom@, > but I think it's about concrete realisation. It's an abstraction layer for dealing with disk transformations (partitioning, RAID, encryption etc.) > I know that it's a layer betwee

Re: Setting maximum data size

2005-03-05 Thread Dag-Erling Smørgrav
Greg 'groggy' Lehey <[EMAIL PROTECTED]> writes: > Some values can be specified like this: > > hw.physmem="1G"# Limit physical memory. See loader(8) > > That doesn't seem to work for MAXDSIZ. I have a patch for this which will go in as soon as I'm done testing it. DES -- Dag-Erl

Re: setenv/unsetenv's known memory leak

2005-02-23 Thread Dag-Erling Smørgrav
Seán C. Farley <[EMAIL PROTECTED]> writes: > How does this version look? Needlessly complicated. I'd just copy the entire environment into malloc()ed space the first time setenv() or putenv() is called. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] _

Re: setenv/unsetenv's known memory leak

2005-02-23 Thread Dag-Erling Smørgrav
Seán C. Farley <[EMAIL PROTECTED]> writes: > While playing around with setenv(), I noticed that it can leak memory > when a program overwrites a variable with a larger value. unsetenv() > will just leak memory. All of this is documented in their man pages. > > The latest PR on this (two PR's ment

Re: Error in my C programming

2005-02-22 Thread Dag-Erling Smørgrav
Giorgos Keramidas <[EMAIL PROTECTED]> writes: > The quotations seem a bit messed up, so I don't know if Peter Jeremy or > Kathy Quinlan wrote the above paragraph. Whoever the author was though, > it may be worth to note that C99 *does* allow single-line comments > delimited by //. which leads to

memory leak in resolver

2005-02-16 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] ~/src/gai% cat gai.c #include #include #include #include int main(void) { struct addrinfo hint, *res; memset(&hint, 0, sizeof(hint)); hint.ai_family = AF_INET; hint.ai_socktype = SOCK_STREAM; hint.ai_protocol = 0; if (getaddrin

Re: i86 install images

2005-02-06 Thread Dag-Erling Smørgrav
Chuck Robey <[EMAIL PROTECTED]> writes: > One item that always irks me, what's the actual name of the disk images. > There is a reticence to answer this on the website, cause they're trying > to make one answer do correct duty for all the arches, but what they've > accomplished is managing to compl

Re: kernel vm question

2005-01-28 Thread Dag-Erling Smørgrav
[EMAIL PROTECTED] (Dag-Erling Smørgrav) writes: > David Schultz <[EMAIL PROTECTED]> writes: > > When the line is there, the compiler is probably smart enough to > > realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away > > both statements. > Wrong. The compiler is free to optimize awa

Re: kernel vm question

2005-01-28 Thread Dag-Erling Smørgrav
David Schultz <[EMAIL PROTECTED]> writes: > On Thu, Jan 27, 2005, Jacques Fourie wrote: > > unsigned char *p = NULL; > > unsigned char v = 0x55; > > /* ... */ > > p = (unsigned char *)ip_output; > > /* ... */ > > v = p[0]; > > p[0] = v; > > /* ... */ > When the line is there, the compiler is probab

Re: Supported SATA Cards

2005-01-26 Thread Dag-Erling Smørgrav
Justin Bennett <[EMAIL PROTECTED]> writes: > I was looking into getting an Adaptec 2410SA SATA (Serial ATA RAID > card). I just wanted to ensure this is supported by FreeBSD. > > I looked at the hardware list, and there is a card listed under the aac > driver as a SCSI device, but with the 2410SA d