Re: Creating real bool type for simulation in physics

2006-03-13 Thread Dan Nelson
of bits and manipulate them individually. They're documented in the bitstring manpage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe

Re: Advice on the lightweight resolver, lwres.

2006-03-09 Thread Dan Nelson
listen on UDP port 921. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Naive implementation of strverscmp(3)

2006-02-15 Thread Dan Nelson
/natsort/ Your function is simpler than the C implementation on that site, but falls over when a run of numbers exceeds 2^31 (raise it to 2^64 if you use strtoull, but that's as high as you can yet). -- Dan Nelson [EMAIL PROTECTED

Re: FreeBSD Real Mode interface

2006-01-30 Thread Dan Nelson
If this is anything like vm86 mode, check out the i386_vm86 manpage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL

Re: increasing dd disk to disk transfer rate

2006-01-12 Thread Dan Nelson
are either reading or writing. If you pipe the first dd into a second one, it'll let you run at the max speed of the slowest device. dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k -- Dan Nelson [EMAIL PROTECTED] ___ freebsd

Re: using get_system_info() - obtaining system load averages

2006-01-09 Thread Dan Nelson
the load average. A simpler way is to just call the getloadavg() function; see its manpage for more info. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

Re: copy directory structure

2005-12-21 Thread Dan Nelson
- - | ( cd /otherpath ; tar xf - ) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: (no subject)

2005-12-19 Thread Dan Nelson
that filesystems are mounted on. That's how it can do backups with the dump command. It has no special access to mounted filesystems themselves. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: easy question about kill command

2005-12-16 Thread Dan Nelson
are started from their own /etc/rc.d/* scripts which know how that particular program works, so you can use them to start/stop/restart daemons and not have to look up pids manually. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers

Re: Number of kevents registered in kqueue

2005-12-16 Thread Dan Nelson
for :) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Does tcpdump2xplot work?

2005-12-13 Thread Dan Nelson
like: id IP to from ... And tcpdump2xplot doesn't want to see that 'IP' field. I'll try to get a patch cobbled... You'll probably get better results using the tcptrace port, which reads capture files directly. -- Dan Nelson [EMAIL PROTECTED

Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-09 Thread Dan Nelson
return EXIT_SUCCESS; % 21 } Won't this break on x86, where physmem is 32 bits? Just use unsigned long, which is what the sysctl type is according to kern_mib.c . -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org

Re: sysctl, HW_PHYSMEM, and crippled gcc

2005-12-08 Thread Dan Nelson
seem to remember having the opposite problem on a memory-limited machine which insisted in allocating a relatively huge percentage of RAM for a sort, and gnu sort uses the same physmem() call for its dynamic sizing. -- Dan Nelson [EMAIL PROTECTED

Re: [PATCH] nsswitch extensions + caching

2005-12-06 Thread Dan Nelson
backends for a variety of interfaces to system databases. For instance getpw*(), gethost*(), etc. Michael's patch itself adds caching to our nsswitch implementation, which dramatically improves performance on slow sources (ldaps, for example). -- Dan Nelson [EMAIL PROTECTED

Re: Filesystem monitoring question

2005-11-18 Thread Dan Nelson
not modified in 60 seconds == done), or if you know the file format, you may be able to validate the contents (check for zipfile end-of-file marker, etc). -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: CPU utilization

2005-11-09 Thread Dan Nelson
list for this question, but take a look at the getrusage() function. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail

Re: rc scripts: how to start a process that doesn't daemonize itself?

2005-10-19 Thread Dan Nelson
rc.d scripts. A (probably cleaner) way is to set start_cmd=/usr/sbin/daemon /usr/local/bin/myprog -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

Re: setsockopt 228K fails with ERR#55 'No buffer space available'

2005-09-10 Thread Dan Nelson
is default of 256k so the above should work if its per socket and not total? I think you want net.inet.tcp.sendspace; kern.ipc.maxsockbuf seems to be unused based on a quick grep of the source. Also check the sockbufsize rlimit, although I think that defaults to unlimited. -- Dan Nelson

Re: ntpd and cmos clock update

2005-08-30 Thread Dan Nelson
of reboot. ntpd will step the clock itself on bootup if it needs to (although not as quickly at ntpdate certainly). Just calling resettodr during shutdown would be the easiest solution, I think. Or have a kernel timer fire that calls it every 24 hours. -- Dan Nelson [EMAIL PROTECTED

Re: [PATCH] caching daemon release and nsswitch patches

2005-08-29 Thread Dan Nelson
nss lookups. How do you ensure that one user can't poison the cache and cause problems for other users? Could cached do all nss operations itself (making it more like nscd in other OSes)? -- Dan Nelson [EMAIL PROTECTED] ___ freebsd

Re: [PATCH] caching daemon release and nsswitch patches

2005-08-27 Thread Dan Nelson
, line 34. You should probably convert cached's argument processing to use getopt, btw. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe

Re: hello world but not in 32bit x86 but in amd64 for amd64 platform

2005-08-17 Thread Dan Nelson
assembly... You can also generate an assembly hello-world program yourself: $ cat EOF test.c int main(void) { write(1, Hello world\n, 12); return 0; } EOF $ gcc -S test.c $ cat test.s -- Dan Nelson [EMAIL PROTECTED] ___ freebsd

Re: File create permissions, what am I missing?

2005-08-13 Thread Dan Nelson
@@ -1336,6 +1336,8 @@ ip = VTOI(tvp); ip-i_gid = dp-i_gid; DIP_SET(ip, i_gid, dp-i_gid); + if (dp-i_mode ISGID) + dmode |= ISGID; #ifdef SUIDDIR { #ifdef QUOTA -- Dan Nelson [EMAIL PROTECTED

Re: Converting libfoo.so for linux to freebsd

2005-08-09 Thread Dan Nelson
printf, which is safe since it doesn't pass a FILE *). -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: sed s///i

2005-08-08 Thread Dan Nelson
In the last episode (Aug 08), Brooks Davis said: Are there any test cases out there for sed RE handling? If not, I'd suggest this would be a good time to create some to help insure this change maintains correctness. /usr/src/usr.bin/sed/TEST/sed.test has a lot of checks -- Dan

Re: Checking sysctl values from within the kernel.

2005-08-05 Thread Dan Nelson
in the kernel, just check the variable directly. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: sendmail and clamav milter setting

2005-07-21 Thread Dan Nelson
a callback for each header, etc). Or this is the correct one: Sendmail SRV -tcp- clamav-milter - tcp/domain socket - clamd server (server A) (server b) (server b) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing

Re: thread-safe popen

2005-07-07 Thread Dan Nelson
In the last episode (Jul 07), Dipjyoti Saikia said: On 7/5/05, Dan Nelson [EMAIL PROTECTED] wrote: In the last episode (Jul 05), Dipjyoti Saikia said: I am working on an OS derived for BSD 4.1 . I am trying to backport a thread-safe version of popen() from BSD 4.10 . popen should

Re: thread-safe popen

2005-07-05 Thread Dan Nelson
in rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a testcase that causes it to fail? -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

Re: problem handling POSIX thread on FreeBSD

2005-06-26 Thread Dan Nelson
) handle_error(); -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: kld problem

2005-06-22 Thread Dan Nelson
value on MOD_UNLOAD to abort an unload request. See the module(9) manpage for more details. You may need to increment a counter or hold a mutex while in the syscall to make it easy for test_load to determine whether it's safe to unload or not. -- Dan Nelson [EMAIL PROTECTED

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

2005-06-10 Thread Dan Nelson
zeros out memory before handing it to processes. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Opening raw disk while mounted in 5.x?

2005-05-25 Thread Dan Nelson
to slice 1 though. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Forcing static-linking on a port?

2005-05-23 Thread Dan Nelson
of a valid reason for them to be used in FreeBSD. Search for (and remove) any occurances of -Wl,-Bdynamic and -Wl,-Bstatic , and you should be set. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: which function

2005-05-22 Thread Dan Nelson
disable it by putting beastie_disable=yes in /boot/loader.conf. The code that actually prints it is in /boot/beastie.4th . -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo

Re: Looking for ANSI/VT100 code replacement.

2005-05-20 Thread Dan Nelson
solution is to not do a write on every iteration. You've got a (maximum) 100hz screen refresh rate anyhow, so doing more than 100 updates per second won't do you any good. Even 10 is probably more than you need. -- Dan Nelson [EMAIL PROTECTED

Re: Looking for ANSI/VT100 code replacement.

2005-05-20 Thread Dan Nelson
time, adding sleeps is definitely not the right way to speed it up :) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail

Re: Console ASCII interpretation

2005-05-16 Thread Dan Nelson
? That's the number of bytes to write. If there happened to be a 4 on the stack, then write() would write 4 bytes starting at whatever buffer your 2nd argument points to. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org

Re: Console ASCII interpretation

2005-05-16 Thread Dan Nelson
of a compose sequence, and if it's still zero at the end, it assumes that the user hasn't done anything. I'd say that's a bug, but a low-priority one, since you can input a NUL via Ctrl-2 or Ctrl-Space. This has nothing to do with how the display driver handles NUL. -- Dan Nelson

Re: Low HDD tranfer rate with FreeBSD 5.3-Release

2005-05-09 Thread Dan Nelson
the relative speeds from start to finish. For the DiamondMax 160, the sustained throughput should be 26MB - 50MB as you go from inner to outer tracks. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: doubt: msgrcv not return EAGAIN?

2005-05-08 Thread Dan Nelson
occur } } but it sounds not works as my expected. It never return errno=EAGAIN, however it return errno=ENOMSG instead, but msgrcv manual say its should return EAGAIN. what's wrong? I think the manpage is incorrect. -- Dan Nelson [EMAIL PROTECTED

Re: clear/set/test_bit header ??

2005-04-13 Thread Dan Nelson
); int set_bit(int offset, int * flag); int test_bit(int offset, int * flag); Any hints? Try the macros in bitstring.h; see the bitstring manpage for usage. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list

Re: C programming question

2005-04-04 Thread Dan Nelson
, addr_t) returning int $ cdecl explain int (*if_watchdog) (int) declare if_watchdog as pointer to function (int) returning int -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman

Re: kqueue and ordinary files

2005-03-30 Thread Dan Nelson
or syslog watchers, so that they get an EVFILT_READ event when the file grows. They may be better off registering an EVFILT_VNODE/NOTE_EXTEND event though, so you could make a case for returning EV_EOF on EVFILT_READ instead of blocking. -- Dan Nelson [EMAIL PROTECTED

Re: a Q on measuring system performance.

2005-03-25 Thread Dan Nelson
. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Kernel documentation and specification

2005-03-24 Thread Dan Nelson
it would take to save and restore the registers on every context switch (and kernel thread switch even), and the difficulty of trapping exceptions. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: running freebsd in qemu using the -nographic option ?

2005-03-23 Thread Dan Nelson
to on. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: mysql threads

2005-03-21 Thread Dan Nelson
a forking model, where each incoming request is handled by a separate process. Consider upgrading to FreeBSD 5.3 (or 5.4, to be released sometime next month), which has much better thread performance than 5.1 or 5.2.1. -- Dan Nelson [EMAIL PROTECTED

Re: iSCSI initiator driver beta version, testers wanted

2005-03-15 Thread Dan Nelson
the better. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Global / Cluster / Shared filesystem for FreeBSD?

2005-03-11 Thread Dan Nelson
a Fibre Channel SAN. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: partial memory dump

2005-03-08 Thread Dan Nelson
. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: partial memory dump

2005-03-08 Thread Dan Nelson
let your changes work with any disk backend. The low-level dadump() function shouldn't really have any knowledge of what it's writing. That's something to fix once you're ready to release you code :) -- Dan Nelson [EMAIL PROTECTED

Re: Libc

2005-03-03 Thread Dan Nelson
it by name like,sys_ash(); cd into /sys/kern, edit syscalls.master, then run make init_sysent.c. That will regnerate a bunch of files, some of which are used to generate the syscall stubs in libc. -- Dan Nelson [EMAIL PROTECTED

Re: about the source of loader

2005-02-28 Thread Dan Nelson
it isn't the kernel. Since it can read UFS filesystems, though, if it can find an /etc/fstab, it will try and pass the path to the root volume to the kernel in the tunable vfs.root.mountfrom. See /sys/boot/common/boot.c:getrootmount() and /sys/kern/vfs_mount.c:vfs_mountroot() . -- Dan Nelson

Re: clock.h

2005-02-28 Thread Dan Nelson
. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Kernel threads libc

2005-02-22 Thread Dan Nelson
. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: realplay and 4.11

2005-02-22 Thread Dan Nelson
machines here at work do provide the GCC_3.3 symbol, so maybe try linux_base-suse-9.2, or linux_base-rh-9. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: Memory Accounting in Proc.h

2005-02-18 Thread Dan Nelson
read from or write to it? Try memset'ing it to zero and see if your numbers change. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send

Re: how to calculate CPU utilization?

2005-02-12 Thread Dan Nelson
maybe), then take their difference and divide by the delay. That will give you the cpu usage over that period. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: KVM Linking

2005-02-02 Thread Dan Nelson
the lib/libkvm files and directory without having to hack it through? Since you're already in the kernel, you can simply read the variables directly. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http

Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem

2005-01-26 Thread Dan Nelson
and/or DOS file systems. That's the first step... Libstand already supports both, and they are included into /boot/loader ( see the file_system[] array in /sys/boot/i386/loader/conf.c ), so it should be able to boot off of both filessytems just fine. -- Dan Nelson [EMAIL PROTECTED

Re: use loader to load kernel.gz and mfsroot.gz in an ext2 filesystem

2005-01-26 Thread Dan Nelson
and its kernel filename from. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: execl bug?

2004-12-29 Thread Dan Nelson
your rewind() with an lseek(0,0,SEEK_SET) makes the program work. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL

Re: counting total PIDs since the server been started

2004-12-14 Thread Dan Nelson
In the last episode (Dec 15), Vlad GALU said: On Tue, 14 Dec 2004 09:23:46 -0600, Dan Nelson [EMAIL PROTECTED] wrote: Most Unixes provide these stats under the vmstat -s command also. It'd be nice if Linux had something like that. However, I've been able to reproduce the desired effect

Re: counting total PIDs since the server been started

2004-12-13 Thread Dan Nelson
: 4795379 vm.stats.vm.v_vforks: 1017309 vm.stats.vm.v_rforks: 0 Hehe, I never noticed those. Most Unixes provide these stats under the vmstat -s command also. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: My project wish-list for the next 12 months

2004-12-01 Thread Dan Nelson
). -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: isp driver not 64 bit?

2004-11-29 Thread Dan Nelson
more interesting is their hex values: DEC0ADDF and DEC0ADDE, aka 0xDEADC0DE. Something's reading memory after the kernel freed it. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman

Re: Snapshot corruption.

2004-11-22 Thread Dan Nelson
it. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: Access time on snapshots.

2004-11-17 Thread Dan Nelson
to the first write to a block; later writes don't affect the snapshot because it's already made a copy of the original data) (also: why doesn't ls have a creation time option?) I think ls is running run out of option letters :) -- Dan Nelson [EMAIL PROTECTED

Re: tcsh is not csh

2004-11-11 Thread Dan Nelson
/44bsd-csh port if you want the original csh. Read up on all the arguments for an against the switch in the thread starting at http://www.freebsd.org/cgi/[EMAIL PROTECTED] (sorry, best link I could find), but you're 4 years too late to affect the outcome... -- Dan Nelson [EMAIL

Re: Hardware Serial Numbers under FreeBSD

2004-11-05 Thread Dan Nelson
the cpuid command in ports can print it. As for the motherboard serial number, you'll probably need to open the case to get that, but try the dmidecode port. My Asus board prints a serial number of xxx, but other boards might actually put a real value in there. -- Dan Nelson

Re: Pb seeking with less on file more size 2Go

2004-10-26 Thread Dan Nelson
into the file, so the version of less that comes with 4.10 probably uses an unsigned int someplace. The version you get when you build the ports/misc/less port does work correctly, though. If you install that, you should be okay. -- Dan Nelson [EMAIL PROTECTED

Re: malloc calls and ioctl calls to soundcard cause segfault

2004-10-13 Thread Dan Nelson
:) Create another variable audio_buf_info info; above main, and change that call to if (ioctl(fd, SNDCTL_DSP_GETOSPACE, info) 0) and your program will run fine. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: Bit field definition ?

2004-10-10 Thread Dan Nelson
, since 1+1+2 is 4 all by itself. No padding is needed or used. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL

Re: please help with: warning: initialization makes integer from pointer

2004-10-08 Thread Dan Nelson
fields struct passwd has, or if they must be in any order. POSIX names only 5 required fields and no order. You could use designated initialization, but that's a C99 feature, and since you're initializing everything to zero anyway, memset is still better. -- Dan Nelson [EMAIL

Re: Bit field definition ?

2004-10-08 Thread Dan Nelson
, so both fields together take up 8 bits = 1 byte. That's the whole purpose of bitfields :) -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
unsafe part is openlog(), so set that up before you start any threads and you'll be okay. Once the log fd is opened, the syslog() call looks to be thread-safe. Everything in there is done with local variables and atomic writes. -- Dan Nelson [EMAIL PROTECTED

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
In the last episode (Oct 06), Dan Nelson said: My question regarding thread-safeness of syslog(): On OpenBSD I used syslog_r() to do thread safe logging (the software in question is a sendmail milter, which runs multithreaded). FreeBSD does not have these functions, but the cc man page

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
on FreeBSD. It just returns a pointer into sys_errlist[]. For invalid values it stuffs Unknown error: ## into a static buffer and returns a pointer to that. I'll update the PR to make syslog call strerror_r(). http://www.freebsd.org/cgi/query-pr.cgi?pr=standards/72394 -- Dan Nelson

Re: Sigmatel USB IrDA dongle

2004-10-01 Thread Dan Nelson
to see if porting them yourself is an option. I think a lot of our USB support comes from NetBSD already. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers

Re: FibreChannel support

2004-09-15 Thread Dan Nelson
. If don't put any FDISK or disklabel partitions on the lun (i.e. you put the filesystem directly on /dev/da#), it's really easy. Dismount the volume, run camcontrol rescan da# to let the system detect the new size, run growfs /mountpoint, remount. -- Dan Nelson [EMAIL PROTECTED

Re: valgrind on 5.3BETA1

2004-08-23 Thread Dan Nelson
: 14620 killed valgrind --skin=memcheck date There doesn't seem to be any docs on these umtx syscalls so I don't know what the expected behaviour is supposed to be. I printed the pointer and the contents of the u_owner member before and after the syscall. -- Dan Nelson [EMAIL

Re: valgrind on 5.3BETA1

2004-08-23 Thread Dan Nelson
In the last episode (Aug 23), Dan Nelson said: --- coregrind/vg_proxylwp.c~ Mon Aug 23 15:47:33 2004 +++ coregrind/vg_proxylwp.c Mon Aug 23 15:48:42 2004 And of course I screwed up the patch. The first argument of each print call should be printing px-mutex, not px-mutex. Here's better

Re: actual boot device

2004-08-17 Thread Dan Nelson
which device was actually used to read the file. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: actual boot device

2004-08-17 Thread Dan Nelson
In the last episode (Aug 17), Sergey Lyubka said: On Tue, Aug 17, 2004 at 11:15:16AM -0500, Dan Nelson wrote: In the last episode (Aug 17), Sergey Lyubka said: How would one know the actual boot device after kernel successfully booted ? The kern.bootfile sysctl points to the kernel

Re: actual boot device

2004-08-17 Thread Dan Nelson
is reading the first 512 bytes of /dev/{da0,ad0,fd0,cd0} and see if any of them have your picobsd bootblock. Then you know where the filessytem holding /kernel is and can mount it yourself. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED

Re: Fwd: How to read bad blocks error message marking of same

2004-08-06 Thread Dan Nelson
, may do automatic reallocation on both reads and writes ( camcontrol mode da0 -m 1, the ARRE and AWRE flags ). If the drive had to reread the block or had to use ECC to recover data, AND the entire block was recovered, it will relocate the data if ARRE is set. -- Dan Nelson [EMAIL

Re: regarding timeout/untimeout kernel functions

2004-07-22 Thread Dan Nelson
implemenation but i can not use that ( which i belive very efficient implementation of timers ), which user can not able to use it , so i just want to discuss it . You could also use the kqueue/kevent functions to queue up an arbitrary number of timer events in a single process. -- Dan Nelson

Re: Getting a fully-qualified path from a PID

2004-07-21 Thread Dan Nelson
the orignal file has been unlinked, or the filename has expired from the kernel's cache). If you are examining another process, you can use the kvm_getargv() and kvm_getenvv() functions to fetch argv[0] and PATH out of the target process. -- Dan Nelson [EMAIL PROTECTED

Re: Article on Sun's DTrace

2004-07-07 Thread Dan Nelson
like D does, but it's got just about everything else. If you just wanted to track syscalls, you could almost use Cerber as-is. http://cerber.sourceforge.net/ -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: using netgraph to connect 2 physical interfaces into one virtual interface

2004-06-24 Thread Dan Nelson
: the system at the other end must be able to handle port aggregation, and must be able to be manually configured. Both nodes do the same thing, in slightly different ways. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: pthread - fork - execv problem

2004-06-22 Thread Dan Nelson
to affect the parent like this, unless the parent does something like holding a mutex used by all the threads and calling wait(). -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: libpthread problem

2004-06-16 Thread Dan Nelson
, and rebuild the port providing that file. A workaround would be to add a libmap.conf entry remapping libc_r to libpthread globally. See the libmap.conf manpage for examples. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list

Re: libpthread problem

2004-06-16 Thread Dan Nelson
In the last episode (Jun 16), Liam Foy said: On Wed, 16 Jun 2004 11:13:39 -0500 Dan Nelson [EMAIL PROTECTED] wrote: In the last episode (Jun 16), Liam Foy said: Hey guys, I seen to get this error on certain applications, such as xmms and beep-media-player: Fatal error 'Spinlock

Re: Problem with a 5.2.1 system and downloading

2004-05-20 Thread Dan Nelson
to anyone ? Your end looks fine. Once your system started sending acks with a nonzero window, the remote end should have started sending more data. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: fsck: % done possible?

2004-05-16 Thread Dan Nelson
dumpfs /mountpoint | head, and multiply ncg by ipg. That'll give you your total inode count. 9 million inodes seems awfully high, so it's got to be near the end. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: C code for parsing rc.conf?

2004-04-14 Thread Dan Nelson
tricks to generate ifconfig_XX0_aliasXX variables, for example, and still allow using your tool to change moused flags. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: FreeBSD and Debugging?

2004-04-11 Thread Dan Nelson
can track down where in your program a particular block of memory was allocated/freed. http://dan.allantgroup.com/FreeBSD/malloc.diff , or PR 52907 -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http

Re: Loosing STDOUT after file rotation

2004-04-02 Thread Dan Nelson
/rc.d/bgfsck does this). You can use programname filtering in syslog.conf to write that output to its own logfile. There's nothing program_name itself can do about the problem, since it didn't open the logfile; the shell did. -- Dan Nelson [EMAIL PROTECTED

Re: Pointers about CPU load measuring

2004-04-02 Thread Dan Nelson
]; the states are listed in sys/resource.h. Top calculates percentages by keeping the previous interval values, calculating diffs, totaling up the diffs, and setting percentage[cpustate] = diff[cpustate]/totaldiff. -- Dan Nelson [EMAIL PROTECTED

<    1   2   3   4   5   >