Re: [PATCH]: today highlighting in [n]cal

2009-04-20 Thread Simon 'corecode' Schubert

Hey Roman,

Roman Divacky wrote:

I made this patch that highlights today in cal/ncal just like gnu
cal does..

www.vlakno.cz/~rdivacky/cal.patch


Thanks for this patch, I've been meaning to hack one up properly, but 
never got to it.  They problems I was facing seem to exist also with your 
patch:


- only works for wide (cal) mode, not ncal mode
- probably won't work properly with year displays:  the year printing 
parts of the code use a length argument to printf (%*s), which will 
confuse escape sequences with actual printed characters


cheers
  simon

--
  3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\
  rock the past  +++  space for low €€€ NOW!1  +++ Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [PATCH]: today highlighting in [n]cal

2009-04-20 Thread Simon 'corecode' Schubert

Roman Divacky wrote:

On Mon, Apr 20, 2009 at 11:21:26AM +0200, Simon 'corecode' Schubert wrote:

Hey Roman,

Roman Divacky wrote:

I made this patch that highlights today in cal/ncal just like gnu
cal does..

www.vlakno.cz/~rdivacky/cal.patch
Thanks for this patch, I've been meaning to hack one up properly, but 
never got to it.  They problems I was facing seem to exist also with your 
patch:


- only works for wide (cal) mode, not ncal mode


it works for ncal 


I didn't try it on FreeBSD, but from inspecting the code, you only 
modified mkmonthb(), which is called for the cal-style layout, but not for 
the ncal-style layout (then mkmonth() is called).


- probably won't work properly with year displays:  the year printing 
parts of the code use a length argument to printf (%*s), which will 
confuse escape sequences with actual printed characters


I am not sure what you mean by year printing can you give me the
exact command line?


just try cal 2009 or so, basically use printyear[b].

cheers
  simon

--
  3 the future  +++  RENT this banner advert  +++   ASCII Ribbon   /\
  rock the past  +++  space for low €€€ NOW!1  +++ Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Jail with a back door interface?

2007-11-27 Thread Simon 'corecode' Schubert

Xin LI wrote:

Steven Hartland wrote:

Is it possible to create a jail with more than one IP?
Looking around this doesn't seem possible but is it?


FreeBSD does not support multiple IP nor IPv6 on jails at this moment,
unfortunately...


AFAIK there exists a patch by pjd@

If not, somebody could also try porting the DragonFly multi ip + ipv6 changes 
to jail.  They're not so complex and should be rather simple to bring over.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: questions on development(7)

2007-11-14 Thread Simon 'corecode' Schubert
[cc cleaned, dropped -current]

Giorgos Keramidas wrote:
 I'm only tracking 'HEAD' most of the time, but there are some efforts
 underway to convert the history of src/.  One notable example is the
 effort to convert to Subversion first, and then use the tags/branches
 and changesets of Subversion to populate an Hg tree.

That seems wrong.  A conversion to subversion means losing precision and
time.

 Also cvs20hg doesn't appear to grok Hg branches (probably because it
 predates them) and it would be Really Nice(tm) if it did.

cvs20hg is deprecated since two years or so.  Please try fromcvs
instead.  There are some bugs left, of course.  Last thing it seems I
introduced some memory overflow problem, so that a conversion of src now
runs out of memory (on a 32bit machine).  Up to a couple of months ago
this was running very smoothly, see [1].

However I don't think that using named branches in hg is a nice or
elegant thing anyways.  But that's OT, of course.

 Both true.  But we are off in a tangent.  If you have interesting bits
 about Hg or other dSCMs, please contact me off-list or help us keep the
 wiki pages about Version Control up to date.

I suppose you know about fromcvs.  I also guess you know that I suggest
using git instead of hg.  Doesn't produce nasty large index files either :)

cheers
  simon

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


Re: questions on development(7)

2007-11-14 Thread Simon 'corecode' Schubert
OutbackDingo wrote:
 I suppose you know about fromcvs.  I also guess you know that I suggest
 using git instead of hg.  Doesn't produce nasty large index files either :)
 So would you think cvs - git - hg might be easier to accomplish ??
 Since one of my goals is to update projects Ive done based on FreeBSD
 that require OS level updating

No, I think git is the better SCM, but that's a personal decision.

Fromcvs converts to both hg and git, using the same algorithm.  I'd
appreciate any help fleshing out the last bugs (also re: scalability).
I'm considering it beta grade quality, but I know of many people using
it on a daily basis without problems.

cheers
  simon

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


Re: questions on development(7)

2007-11-14 Thread Simon 'corecode' Schubert
Giorgos Keramidas wrote:
 I'm only tracking 'HEAD' most of the time, but there are some efforts
 underway to convert the history of src/.  One notable example is the
 effort to convert to Subversion first, and then use the tags/branches
 and changesets of Subversion to populate an Hg tree.
 That seems wrong.  A conversion to subversion means losing precision
 and time.
 Can you elaborate a bit.  I am not sure I got why you lose precision.

This is due to the fact that CVS doesn't have changesets.  It is too
late now and it is also quite complicated to explain, but it boils down
to the fact that aggregating changesets will remove information, namely
the single file revisions, which you could use for a direct conversion
to hg/git.

 Also cvs20hg doesn't appear to grok Hg branches (probably because it
 predates them) and it would be Really Nice(tm) if it did.
 cvs20hg is deprecated since two years or so.
 I know that.  It's just that fromcvs doesn't quite work for me here,
 yet, so I had to stick with a patched cvs20hg version.

I am surprised that cvs20hg works better.  Fromcvs allows you to ignore
certain branches, maybe that's what you need?

 Please try fromcvs instead.  There are some bugs left, of course.
 Last thing it seems I introduced some memory overflow problem, so that
 a conversion of src now runs out of memory (on a 32bit machine).  Up
 to a couple of months ago this was running very smoothly, see [1].
 
 Something is missing for [1], I guess :)

yes, sorry.

[1] http://www.theshell.com/cgi-bin/gitweb.cgi/

 I tried fromcvs to the doc/ tree (non-branched, less repo-surgery
 magic to handle), but it stops with a traceback very soon:
 
 % $ pwd
 % /home/keramida/hg/fromcvs/fromcvs
 % $ ruby tohg.rb /home/ncvs doc ~/tmp/foo
 % [...]
 % /home/ncvs/doc/bn_BD.ISO10646-1/articles/new-users
 % /home/ncvs/doc/bn_BD.ISO10646-1/articles/explaining-bsd
 % /home/ncvs/doc/FAQ/Attic
 % upgrading roberto to 1/ (1.1.1)
 % Traceback (most recent call last):
 %   File ./tohg.py, line 102, in module
 % destrepo.dispatch()
 %   File ./tohg.py, line 98, in dispatch
 % func(*l[1:])
 %   File ./tohg.py, line 78, in cmd_commit
 % extra = {'branch': branch})
 % TypeError: commit() got an unexpected keyword argument 'wlock'
 % tohg.rb:200:in `readline': end of file reached while handling set 
 [doc/handbook/Attic/troubleshooting.sgml,v:1.1.1.1,doc/handbook/Attic/sup.sgml,v:1.1.1.1,doc/handbook/Attic/slips.sgml,v:1.1.1.1,doc/handbook/Attic/slipc.sgml,v:1.1.1.1,doc/handbook/Attic/scsi.sgml,v:1.1.1.1,doc/handbook/Attic/ppp.sgml,v:1.1.1.1,doc/handbook/Attic/ports.sgml,v:1.1.1.1,doc/handbook/Attic/porting.sgml,v:1.1.1.1,doc/handbook/Attic/nfs.sgml,v:1.1.1.1,doc/handbook/Attic/submitters.sgml,v:1.1.1.1,doc/handbook/Attic/kerberos.sgml,v:1.1.1.1,doc/handbook/Attic/handbook.sgml,v:1.1.1.1,doc/handbook/Attic/glossary.sgml,v:1.1.1.1,doc/handbook/Attic/diskless.sgml,v:1.1.1.1,doc/handbook/Attic/dialup.sgml,v:1.1.1.1,doc/handbook/Attic/eresources.sgml,v:1.1.1.1,doc/handbook/Attic/current.sgml,v:1.1.1.1,doc/handbook/Attic/ctm.sgml,v:1.1.1.1,doc/handbook/Attic/basics.sgml,v:1.1.1.1,doc/handbook/Attic/authors.sgml,v:1.1.1.1,doc/handbook/Attic/bibliography.sgml,v:1.1.1.1]
  (EOFError)
 % from tohg.rb:200:in `_commit'
 % from tohg.rb:122:in `create_branch'
 % from ./fromcvs.rb:989:in `commit_sets'
 % from tohg.rb:228
 % $
 
 I don't know how to read Ruby code, so I can't fix this myself, but any
 ideas/help/patches you have I can test easily :)

This is because mercurial changes its API on every release.  Somebody
who is using hg and fromcvs needs to update the code.  I got tired of this.

 I suppose you know about fromcvs.  I also guess you know that I
 suggest using git instead of hg.  Doesn't produce nasty large index
 files either :)
 I wasn't aware that you strongly prefer Git.  Any references I can read,
 so find out more about why you do?

Sorry, I didn't write up the reasons.  It's more of a personal feeling
and a preference for the git repository layout.  This layout allows many
things to be implemented in a very simple way (ref. branches).  Also, it
is better suited to have multiple branches in a repo, which is usually
what you want to do if you're syncing with multiple persons.  Hg only
has heads.

cheers
  simon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Useful tools missing from /rescue

2007-09-02 Thread Simon 'corecode' Schubert

Tim Kientzle wrote:

I atttempted to
fit 'vi' in there, but curses is rather finicky;
'sed' would be more useful.


Mined is a nice editor for this, running without curses.  A statically 
linked, stripped binary is about 100k in size, so if crunched it would 
have a very small impact.


cheers
  simon

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


Re: modify syscall nr on-the-fly

2007-08-23 Thread Simon 'corecode' Schubert

Ivan Voras wrote:
You might also want to look into porting the vkernel stuff from 
DragonFly.  It shouldn't be very much work to do.  Don't expect great 
performance though, it's mostly still a development tool.

I know of it, but does it run Linux? :)


No, but I've heard about people wondering if they could use it for UML or 
kqemu.  But these are probably just ideas.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: modify syscall nr on-the-fly

2007-08-22 Thread Simon 'corecode' Schubert

Ivan Voras wrote:
This is very interesting. Do you have a web page with progress status, 
blog or something similar to track your work? I'm interested in testing 
this when it's ready (in absence of Xen, this could be the next best 
thing).


You might also want to look into porting the vkernel stuff from DragonFly.  It 
shouldn't be very much work to do.  Don't expect great performance though, it's 
mostly still a development tool.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE?

2007-08-15 Thread Simon 'corecode' Schubert

Dag-Erling Smørgrav wrote:

Sven Hazejager [EMAIL PROTECTED] writes:

No, camcontrol does not support this over USB. Windows XP demonstrates
it is technically possible, and I do not believe it is fully safe to
disconnect the drive (even when unmounted), as the drive then is not
able to park its heads, which it DOES do under XP.

All modern disks (since at least the early 1990s) automatically park
their heads when they lose power.  There is no need to do it in
software.


So it seems that windows is switching off the power of the devices when you select 
eject.  I can see that some users might feel more comfortable with this 
behaviour.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Is it possible to use IPv4 and IPv6 in a same jail?

2007-07-31 Thread Simon 'corecode' Schubert

Bjoern A. Zeeb wrote:

Is it possible to use IPv4 and IPv6 in a same jail?  Or do I have to
write a listening daemon that acts as a proxy that runs in the host?


jails do not (yet) support IPv6. I hope to be working on that again by
the end of the week.


Did you look at the DragonFly support for ipv6 and multiple IPs in jails?  It's 
kind of intrusive, but not very much more than the common jail code is anyways.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cvs: how to put vendor-deleted file into Attic?

2007-07-26 Thread Simon 'corecode' Schubert

Xin LI wrote:
While maintaining some third party contributed software packages I ran 
into a problem where, say, if I remove a file from the vendor branch 
(the file was never dragged off the vendor branch), it does not appear 
in Attic.


But it appears as deleted?  That's interesting then.  How is that possible?  
Can you share the RCS file?

Is there a way to move it into Attic (presumably this would give better 
checkout speed for -HEAD)?


Do you think that CVS is so clever to check the Attic only for branches other 
than HEAD?  I didn't think so, but, hey, who knows.

cheers
 simon
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How do I daemonize a process?

2007-07-23 Thread Simon 'corecode' Schubert

Garrett Cooper wrote:

Garrett Cooper wrote:
   As the subject suggests I'm trying to determine how I can daemonize 
a C process, outside of using the rc infrastructure, so that it won't 
exit when the TTY exists. Does anyone know any quick references or 
examples?

Thanks,
-Garrett


s/C process/C application process/
s/exists/exits/
s/any quick/of any quick/


I suggest daemon(3) if it doesn't have to be portable.

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dlsym() on implicit loaded symbols

2006-07-16 Thread Simon 'corecode' Schubert

Roland Dittel wrote:
We have a issue with dlsym() on symbols imported by a library that 
was loaded with dlopen(). Our code loads the libssl with dlopen() and 
then do a dlsym() on several symbols. This works for all symbols 
exported by libssl itself but fails for symbols exported by 
libcrypto.

[..]

  func = dlsym(handle, CRYPTO_set_id_callback);


you have to use RTLD_DEFAULT instead of handle, but I agree, this is not in 
conformance with SUSv3:

   The dlsym() function shall search for the named symbol in all objects loaded 
automatically as a result of loading the object referenced by handle (see 
dlopen()). Load ordering is used in dlsym() operations upon the global symbol 
object. The symbol resolution algorithm used shall be dependency order as 
described in dlopen().

   The RTLD_DEFAULT and RTLD_NEXT flags are reserved for future use.

Note in all objects loaded automatically.  Good catch!

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \



signature.asc
Description: OpenPGP digital signature


Re: dlsym() on implicit loaded symbols

2006-07-15 Thread Simon 'corecode' Schubert

Roland Dittel wrote:

Hi all,

We have a issue with dlsym() on symbols imported by a library that was 
loaded with dlopen(). Our code loads the libssl with dlopen() and then 
do a dlsym() on several symbols. This works for all symbols exported by 
libssl itself but fails for symbols exported by libcrypto. Libssl is 
dynamically linked to libcrypto and should be loaded for libssl. I did a 
truss and the FreeBSD loader loads libcrypto but does not read anything 
from the file pointer.


could you post a sample code fragment which illustrates the problem you are 
seeing?

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \



signature.asc
Description: OpenPGP digital signature


Re: fork inside ip_input

2006-07-14 Thread Simon 'corecode' Schubert

Mykola Stryebkov wrote:

Hi all.

Have a strange question: is it possible to create new process (using
fork or fork1) from inside of ip_input()?


i don't think so.


In kernel sources i found example of using fork1 in init_main.c but
looking into ip_input.c i do not understand where i can get pointers to
a thread and parent process to pass it into fork1.


only a process can fork, but ip_input is run from interrupt, not in a process 
context.  which process do you want to fork anyways?

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \



signature.asc
Description: OpenPGP digital signature


Re: Named requests filling up T1

2006-01-17 Thread Simon 'corecode' Schubert

Steve Suhre wrote:
Thanks, I think that's what I was looking for. I expect the ISP is in 
another country somewhere and would be hard to reach, if they could be 
reached at all. And it's probably a bad reference somewhere to the 
server here, so shutting of recursive queries could help... If I shut 
named off for an hour or two they go away, so I'm guessing the offending 
server switches to the secondary and gets what it's looking for?


In any case you should only allow recursive queries for your trusted 
clients and/or downstream nameservers which forward to you.


Otherwise
a) you produce outgoing traffic when some stranger wants to
b) your dns cache can easily be poisoned because of a)

cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: silly gcc bug in RELENG_6

2005-11-02 Thread Simon 'corecode' Schubert

Brian Buchanan wrote:

test.c: In function `foobar':
test.c:6: error: invalid application of `sizeof' to incomplete type 
`test.c'

Looks like someone goofed up some printf() args.


yah, but it's in the gcc code itself, no FreeBSD modification.

cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nvi for serious hacking

2005-10-24 Thread Simon 'corecode' Schubert

Matthew D. Fuller wrote:

Most favourite example:
I personally still get mad if it comes to the u undo key.

I miss :N.  You have to :split and then :n separately.


Do you mean :sn?

cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: in_cksum() for ip packets with multiple mbufs

2005-10-24 Thread Simon 'corecode' Schubert

kamal kc wrote:

   -  final thing does this makes any difference
 (calling the htons() twice):

  ip-ip_id=htons(ip-ip_id);
  ip-ip_id=htons(ip-ip_id);


on little endian machines: yes.  on big endian machines:  no.  So don't 
do it. :)


freebsd has several fields of the ip headerin host byte order to speed 
up access.  they get converted to network byte order at a very late 
stage of the ip output path.


cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IOCTL :Facing problems while acccessing data from kernel space

2005-09-28 Thread Simon 'corecode' Schubert

rashmi ns wrote:

#define HDLCMODE _IOR('6',0xF,int)
when i trying to uprintf the data which was sent from the user-space in
the device-driver-ioctl-routine i'll get a different value than which was
passed. Can anybody please tell me why this is happening . I pass the
address of an integer where data is stored from the user space as third arg
to the ioctl call .


maybe you should show how you do it in kernel.  I suspect you try to 
access it as an int* as well, which is wrong.  The kernel already does 
take care of this for you.  Just write the integer you want to pass into 
the data area and you're done.


cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: syscons and SC_NO_CUTPASTE issue

2005-09-11 Thread Simon 'corecode' Schubert

On 08.09.2005, at 11:25, Mike Adewole wrote:

I propose that:
(d) the next release of the generic kernel should be compiled with
SC_NO_CUTPASTE


why?  I find cut+paste really useful per default.

besides, can't this be controlled with a sysctl?

cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


PGP.sig
Description: This is a digitally signed message part


Re: how to handling read only cvs trees

2005-09-11 Thread Simon 'corecode' Schubert

On 07.09.2005, at 15:32, Gordon Bergling wrote:

Has anyone a hint on how to handle this situation?


you might want to look at development(7).  Not sure if this is being 
used by many people though.


cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


PGP.sig
Description: This is a digitally signed message part


Re: help w/panic under heavy load - 5.4

2005-07-24 Thread Simon 'corecode' Schubert

On 24.07.2005, at 16:19, Edwin wrote:

(kgdb) f 13
#13 0xc068f6e9 in ip_fastforward (m=0xc12e2300) at 
/usr/src/sys/netinet/ip_fastfwd.c:572

(kgdb) i loc
ip = (struct ip *) 0xc12f000e
m0 = (struct mbuf *) 0xc12f000e
ro = {ro_rt = 0xc11ee420, ro_dst = {sa_len = 16 '\020', sa_family = 2 
'\002',

sa_data = \000\000ˬ\002\005\000\000\000\000\000\000\000}}
dst = (struct sockaddr_in *) 0xc76bfc3c
ia = (struct in_ifaddr *) 0x0
ifa = (struct ifaddr *) 0x0
ifp = (struct ifnet *) 0xc0f91800
odest = {s_addr = 84060352}
dest = {s_addr = 84060352}
sum = 0
ip_len = 0
error = 84060352
hlen = -1057417216
mtu = 0
__func__ = ip_fastforward


error == 84060352 == dest.s_addr
hlen == -1057417216 == 0xc0f91800 == ifp


(kgdb) f 12
#12 0xc0692b74 in ip_fragment (ip=0xc12f000e, m_frag=0xc76bfc6c, 
mtu=-1056775680, if_hwassist_flags=0, sw_csum=1)

at /usr/src/sys/netinet/ip_output.c:967
967 m-m_next = m_copy(m0, off, len);
(kgdb) i loc
mhip = (struct ip *) 0xc102e240
m = (struct mbuf *) 0xc102e200
mhlen = 20
error = 0
hlen = 20
len = 1480
off = 1500
m0 = (struct mbuf *) 0xc12e2300
firstlen = 1480
mnext = (struct mbuf **) 0xc12e2304
nfrags = 1


mtu (parameter) == -1056775680 == 0xc102e200 == m

your stack (or gdb) seems seriously broken

cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \



PGP.sig
Description: This is a digitally signed message part


Re: Bootstrapping install from GRUB

2005-07-15 Thread Simon 'corecode' Schubert

Ryan Nowakowski wrote:

I'd like to bootstrap a FreeBSD 5.4 install from GRUB or another
harddrive-based bootloader without using PXEboot.

Problem:  GRUB will boot the FreeBSD loader, however I can't get
the loader to read a kernel from any of my existing partitions(ext2,
reiserfs, fat16).  I know it can load a kernel from UFS but I have to
have FreeBSD installed to create a UFS partition(catch-22).  Is there a
way to get a non-pxeboot loader to grab the kernel from a non-UFS
filesystem or perhaps the network(NFS or TFTP)?

Suggestions?


First time load the kernel via grub, not the loader. The kernel will 
complain, yet still work. After you're done installing, you can switch 
grub to use the loader.


cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Forcing a packet through an interface (OT?)

2005-07-12 Thread Simon 'corecode' Schubert
Lately Mario Lobo [EMAIL PROTECTED] said:
 The problem lies with the fact that, there is a router between my rl0 and the 
 internet.
 
 1) rl0 --- router -- antenna --  ISPx -- internet
 
 So the fact that i can ping the hop next to rl0 doesn´t mean the link is up 
 :(.

use a source route to the gateway of rl0?

cheers
  simon

-- 
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


pgpJOcNlmN6Pd.pgp
Description: PGP signature


cvs crosscheck up again

2005-07-10 Thread Simon 'corecode' Schubert

hey hackers,

just wanted to drop a quick note that the cvscrosscheck which existed 
at the beginning of the year is now up again. it still needs some 
tweaks, but I consider it almost there where I want it to be.


http://oly.corecode.ath.cx/~corecode/cgi-bin/crosscgi.py

with the help of Andreas Hauser I implemented a small search machine 
for commit messages. Now it's kinda useful.


I just tried it with safari, firefox, links and lynx. Tell me if there 
are visual artefacts with your browser.


feedback appreciated!

cheers
  simon

ps: i guess openbsd and netbsd might be interessted as well, but i 
don't know the appropriate lists there, could somebody enlighten me?


--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


PGP.sig
Description: This is a digitally signed message part


Re: linking libjava.so RPATH problem

2005-07-07 Thread Simon 'corecode' Schubert
Lately Vasil Dimov [EMAIL PROTECTED] said:
  1) Does the fact that the linker does not realize that the libraries
  have already been found indicate a bug in the linker?  If so, how do I
  best report it?
 I cannot think of any sensible reason for this behavior, so I guess it
 would be good if it can be fixed without breaking something else :)
 You best report it by creating a patch and using send-pr(1) to submit
 it.

I don't think this is breakage: same soname doesn't account for same
binary, especially if rpath is used. Rpath explicitly states i (the
elf object) want the libs from this path first, not for me and
descendants, search this path first. At least that's what I expect it
to do.

cheers
  simon

-- 
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


pgpc3NxRRohoM.pgp
Description: PGP signature


Re: hot path optimizations in uma_zalloc() uma_zfree()

2005-07-04 Thread Simon 'corecode' Schubert
Lately Nikos Ntarmos [EMAIL PROTECTED] said:
 Ummm... What compiler version are you use? The pointer variant produces
 faster code for me on both NetBSD/alpha (gcc 3.3.3) and Linux/x86 (gcc
 3.3.5), using both -O0 and -O2 (other compiler flags also tested with
 similar results). Perhaps something specific to FreeBSD then? I guess
 I'll have to set up a FBSD box and have a look at it, when I catch up
 with some of the other stuff in my todo list...

This is micro-optimization at its best. I doubt it has any influence in
real world scenarios. And if it does, something else is extremely broken.
You don't want to takt the route and implement it in assembler?

Besides, I guess it's totally CPU dependant, how stuff can be pipelined,
all memory locations ought to be in the cache anyways.

cheers
  simon

-- 
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low $$$ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


pgpau0yQIT3TE.pgp
Description: PGP signature


Re: Kernel mode programming -precisions

2005-01-18 Thread Simon 'corecode' Schubert
On Tuesday, 18. January 2005 20:54, Street Chaman wrote:
 Actually, my soft is a kind of interactive filter: it takes a lot of imput
 parameters (from keyboard at the moment, but as soon as i've understood how
 it works, i will increase the number of supported io devices); treats it in
 a particular way and produces an output. This 'particular way' requires a
 lot of clock cycle, so speed is my first problem; (that's part of reason
 why everything is directly written in assembly). I've already buffered
 input and output, but only as far at it was possible: since loop (X) input
 could affect loop (X-1) general data manipulation, and change output, it
 must be detected quickly. The time needed to read/write is still to long.
 When CPU is waiting on some new data, he cannot preform any other
 operation, and freezes data manipultion; that's why I'm looking for a new
 way to in/output the soft...

you don't describe where the data comes from and where to goes to. if it's a 
file, you might want to use memory mapped files (mmap(2)), which will give 
you (about) the least overhead in reading/writing which can be achieved.

so your problem more sounds like a cpu-bound than an io-bound application. 
details could help to understand and give advice.

oh yes, if your particular way is so complex and critical that it needs to 
be written in assembler you might even consider using an FPGA extension, but 
that's a completely other way of solving speed problems. furthermore that's 
just of interest if your algorithm is vectorizable, and it didn't sound like 
it.

cheers
  simon

-- 
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgpZalUh5Od2g.pgp
Description: PGP signature


Re: gdb not finding shared libraries for emulated binaries

2004-12-21 Thread Simon 'corecode' Schubert
On Tuesday, 21. December 2004 17:52, Steven Hartland wrote:
 Is there a way or a patch to make gdb search the relevant compat
 directories when debugging a emulated binary.

 As it stands I have to symlink all the libs from /compat/linux/lib
 which is really messy.

you should be using an emulated gdb, too.

cheers
  simon

-- 
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp2kezAGYGQk.pgp
Description: PGP signature


Re: nfs within jail

2004-12-13 Thread Simon 'corecode' Schubert
On 14.12.2004, at 13:09, Matt wrote:
Quick question regarding nfs (or other filesystems) inside a jail.  As 
far as I can tell, it isn't possible to mount nfs shares while inside 
a jail.  Is this correct?  Is there any way around this limitation?  A 
way to browse network shares without mounting?  Or some such trickery? 
 Thanks.
you need to mount them from the outside into the jail
cheers
  simon
--
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


PGP.sig
Description: This is a digitally signed message part


Re: HD Mirroring

2004-11-24 Thread Simon 'corecode' Schubert
On Wednesday, 24. November 2004 22:31, Charles Sprickman wrote:
 On Wed, 24 Nov 2004, Brian Reichert wrote:
  And, although I've not tested it, recent versions of MySQL can
  outright support a cluster:
 
   http://dev.mysql.com/doc/mysql/en/NDBCluster.html
 I'm just curious if there's any other solution that will work on FreeBSD.
 I have about 5 mysql servers (4 slaves, 1 master) and one application in
 particular is not smart enough to try other servers if the configured
 server does not answer.  Is there any type of local proxy that can
 intelligently route requests to the best server?

maybe use CARP for that?

cheers
  simon

-- 
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp3qrXgKV7fX.pgp
Description: PGP signature


Re: read/write less than sector size

2004-11-10 Thread Simon 'corecode' Schubert
On 10.11.2004, at 16:36, Nehal wrote:
if i open /dev/ad1s1 for example, i try to read() or write()
not in multiples of 512, it will return an error.
how would i do this? currently, if i need to read 100 bytes,
i read in the full sector, then memcpy the bytes i need.
is there a better way?
maybe mmap the device if that's possible?
cheers
  simon
--
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


PGP.sig
Description: This is a digitally signed message part


Re: cvs commit: src/sys/boot/i386/boot2 boot2.c

2004-09-19 Thread Simon 'corecode' Schubert
On 19.09.2004, at 00:08, Poul-Henning Kamp wrote:
 Err, I don't see how it could.  This only affects how boot2 
handles addresses
in the executables it loads, it doesn't affect how the kernel manages 
memory
at all.
We're seeing isa-dma bounce buffers getting hard to get hold of these
days.
Is there a way to first default to above-16M memory segments on 
allocations and only take the lower 16M if either a) explicitly 
requested by M_LOWMEM or b) no more high memory available?

cheers
  simon
--
/\
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


PGP.sig
Description: This is a digitally signed message part


Re: Dummynet pipes and MRTG

2003-12-19 Thread Simon 'corecode' Schubert
Lately Vlad Galu told:

 Take a look at RRDTool. There also is a Perl module for drawing RRD
 graphics, which you could use for fancier stuff. However, some simple
 shellscripting should do your job.
   
   http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/

a nice frontend for rrdtool is LRRD, which is also easy extendable via
anything that can be executed[tm]:
http://www.linpro.no/projects/lrrd/

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Re: Prebinding for DragonFly/FreeBSD-4

2003-09-14 Thread Simon 'corecode' Schubert
Lately Matthew N. Dodd told:

 Prebinding on a per executable basis rather than a per object (ELF
 executable or library) means that when you go to prebind KDE (for
 example) you run /var out of diskspace :/

Yes, that might be true. How about this approach:
(doesn't cope with cyclic ``needs'' yet)

- assign every .so a base address so that no collisions happen for every
  binary considered

Then, for every binary:
- start with resolving the last object (often libc), as if only this
  object was loaded
- proceed to the next object (might be another .so or the binary)
- there again, resolve stuff. if this changes resolved data in
  objects resolved before (global references...), save this data too,
  like deltas to the data of the object before.
- loop

This means: Every object has the data assigned which it ultimatively
requests. If globals etc exists they will overridden by the next object
which requested previous object.

On load, just run the same way. First, load data of the last object
(i.e. libc), then running the object list back to the binary, load data.
Globals that get resolved another way than without object X will be
overwriten by the patchup data for object X.

Uhg, I hope I made myself (at least partly) clear enough to follow.

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Prebinding for DragonFly/FreeBSD-4

2003-09-12 Thread Simon 'corecode' Schubert
I created patch for DragonFly/FreeBSD-4 for prebinding, based on
mdodd@'s patch for FreeBSD-5.

The main difference (apart from the target platform) is that the linker
needn't be patched. Rtld now uses a hash function to get an unique ID
for every ELF object.

This has been tested under DragonFly, but should run on FreeBSD-4 too.

Feedback appreciated :)

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Re: Prebinding for DragonFly/FreeBSD-4

2003-09-12 Thread Simon 'corecode' Schubert
No-brainer.

Get the patch from here:
http://chlamydia.fs.ei.tum.de/~corecode/prebind.diff


-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News


pgp0.pgp
Description: PGP signature


Re: FreeBSD Port: portupgrade-20021216

2003-01-23 Thread Simon 'corecode' Schubert
Lately Peter Pentchev told:

 Attached is a patch to the libexec/ftpd source, which adds a new -P
 option taking an argument of either a numeric port number or a service
 name as described in the getaddrinfo(3) manual page.  What do people
 think about adding this functionality?

looks good

cheers
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg39377/pgp0.pgp
Description: PGP signature


Re: BSD API

2002-07-24 Thread Simon 'corecode' Schubert

On Wed, 24 Jul 2002 14:22:28 +0600 Sulaiman Khan wrote:

 The sockets for my software are based on the BSD Sockets API. I want
 to make them fully compatiable with the BSD Sockets. For that I
 require a complete listing of the BSD Sockets function prototypes. can
 you guide me where i can find them. Thanks a lot. 

http://www.freebsd.org/cgi/man.cgi

start with socket(2)


-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg35935/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-04-02 Thread Simon 'corecode' Schubert

On Tue, 2 Apr 2002 10:34:07 +0200 (CEST) Alexander Leidinger [EMAIL PROTECTED] 
wrote:

 On  1 Apr, Simon 'corecode' Schubert wrote:
 
   my first tries for the patched include files can be found here:
   http://corecode.ath.cx/~corecode/stuff/icc-patched-includes-0.1.tgz
  
  We should either fix the base system, or ${IA32ROOT}/includes/.
  
  i'd really like to, but the headers from the base system are just not
  standard conformant enough.
  the headers coming with icc just don't fit our libs; they are specially
  crafted for use with redhat linux 7.1 :/
  i already tried to fix these, but our implementation of the multibyte
  functions won't let this be an easy task (if it ever can be solved):
 
 Do you have test cases where the removal of icc's includes and the use
 of -X -I/usr/include/g++ -I/usr/include fails?

yes. just as simple as that:

#include string
std::string test;

it also fails after fixing the wchar_t thingy.
the headers from the base system don't use namespaces correctly...

i've tried both 2.95.3 and 3.0.4 headers, look at
http://www/~corecode/stuff/patch-include.3.0.4.tgz and .2.95.3.tgz for
the results; both still don't compile.

to test these, just prepend this one include directory to the search
path and use the appropriate g++ include dir.

cheerz
  simon

ps: i hope we will get this done some time ;]

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33253/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-04-02 Thread Simon 'corecode' Schubert

On Tue, 2 Apr 2002 14:30:59 +0200 (CEST) Alexander Leidinger [EMAIL PROTECTED] 
wrote:

 On  2 Apr, Simon 'corecode' Schubert wrote:
 
  Do you have test cases where the removal of icc's includes and the use
  of -X -I/usr/include/g++ -I/usr/include fails?
  
  yes. just as simple as that:
  
  #include string
  std::string test;
  
  it also fails after fixing the wchar_t thingy.
  the headers from the base system don't use namespaces correctly...
 
 test.cc, line 4: error: name followed by :: must be a class or namespace name
   std::string test =Hello World;
   ^
 
 So we have to fix the base system headers in this regard and discard
 Intels C++ headers?
 
 What about these errors?
 ---snip---
 test.cc:
 /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class 
template reverse_iterator
 typedef ::reverse_iteratoriterator reverse_iterator;
^
 
 /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class 
template reverse_iterator
 typedef ::reverse_iteratorconst_iterator const_reverse_iterator;
 ---snip---

all these are because the headers from the base system are not standards
conformant. i don't think fixing these headers will be an easy task.
tomorrow i'll check out if i can somehow patch the icc headers and/or
continue to patch the headers coming from gcc 3.0.4

cheerz
  simon

-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33255/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-04-02 Thread Simon 'corecode' Schubert

On Tue, 02 Apr 2002 15:22:32 -0800 Terry Lambert [EMAIL PROTECTED] wrote:

 Alexander Leidinger wrote:
  test.cc, line 4: error: name followed by :: must be a class or namespace name
std::string test =Hello World;
^
  
  So we have to fix the base system headers in this regard and discard
  Intels C++ headers?
 
 This appears to be an attempt to declare an instance of an
 internal subclass.  Probably needs the code fixed.

i think this because the gcc 2.95.3 headers don't use namespaces
correctly.
so std:: is unknown :(

 
  What about these errors?
  ---snip---
  test.cc:
  /usr/include/g++/std/bastring.h, line 142: error: too few arguments for class 
template reverse_iterator
  typedef ::reverse_iteratoriterator reverse_iterator;
 ^
  
  /usr/include/g++/std/bastring.h, line 143: error: too few arguments for class 
template reverse_iterator
  typedef ::reverse_iteratorconst_iterator const_reverse_iterator;
  ---snip---
 
 These are compiler errors.  Try puting spaces in between the
 tokens.  Specifically, after the :: and around the .  It's
 been a while since I've seen code written with this style, so I
 can't give you the magic incantation off the top of my head.

the headers don't define reverse_iterator the way it is expected by
bastring.h; have a look at interator and you will see.

i've fixed this problem but then other (namespace related) problems
arise:

bastring.h uses ::reverse_iterator (as you can see ;]) but these really
should be std::reverse_iterator...

cheerz
  simon


-- 
/\   http://corecode.ath.cx/#donate
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33278/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-04-01 Thread Simon 'corecode' Schubert

On Mon, 1 Apr 2002 10:55:22 +0200 (CEST) Alexander Leidinger [EMAIL PROTECTED] 
wrote:

 On 31 Mär, Simon 'corecode' Schubert wrote:
 
  that's right. but as terry said, it seems to be a bad idea to use some
  headers that don't fit the libs.
  i tried to patch the headers coming with 4.4-S and lang/gcc30 (because
  the one from the base system doesn't provide a proper c++ stl
  implementation)
 
 From a C++ POV this may be better, but don't you think we better fix the
 base system instead?

this would be nice, but gcc 2.95.3 (from 4.4 base system) can't cope
with several things so that the header files are not yet that
sophisticated.

gcc 3.0.4 on the other hand ships with lots of more standardized
headers. if i am informed correctly, 5.0-c uses gcc 3.0.4?

i don't think we can use gcc 2.95.3 with the 3.0.4 headers (didn't try
tho)

  my first tries for the patched include files can be found here:
  http://corecode.ath.cx/~corecode/stuff/icc-patched-includes-0.1.tgz
 
 We should either fix the base system, or ${IA32ROOT}/includes/.

i'd really like to, but the headers from the base system are just not
standard conformant enough.
the headers coming with icc just don't fit our libs; they are specially
crafted for use with redhat linux 7.1 :/
i already tried to fix these, but our implementation of the multibyte
functions won't let this be an easy task (if it ever can be solved):

eg. class ctype relies on these functions not being implemented and lots
of other classes in turn depend on ctype...
i'm not sure if this will be any better than fixing the gcc 3.0.4
headers, but lets see...

cheerz
  simon


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33239/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-03-31 Thread Simon 'corecode' Schubert

On Sun, 31 Mar 2002 19:52:21 +0200 (CEST) Alexander Leidinger 
[EMAIL PROTECTED] wrote:

 On 31 Mär, I wrote:
 
  /usr/include/stdlib.h, line 57: error: invalid combination of type specifiers
typedef   _BSD_WCHAR_T_   wchar_t;
  
  This seems to be a problem with the wchar_t being intrinsic,
  and defined anyway for the compiler.
  
  So we just have to #if !defined(__ICC) it? Hmm, I have to test this,
  perhaps tomorrow.
 
 I had time to do it now, and yes, this fixes theses errors
 (http://www.leidinger.net/FreeBSD/icc.src:include.diff), but there are
 other errors, which seem to be a result of an incomplete wchar
 implementation...

that's right. but as terry said, it seems to be a bad idea to use some
headers that don't fit the libs.
i tried to patch the headers coming with 4.4-S and lang/gcc30 (because
the one from the base system doesn't provide a proper c++ stl
implementation)

i've managed to fix several errors but now i'm hanging at this message,
and i don't really know how to proceed:

icc -I./include -I/usr/include -I/usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/
3.0.4/include/g++  -I /usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/3.0.4/inclu
de/g++/i386-portbld-freebsd5.0 -c e.cc
e.cc:
/usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/3.0.4/include/g++/bits/basic_str
ing.h, line 860: error: no instance of constructor std::basic_string_CharT, _
Traits, _Alloc::_Alloc_hider::_Alloc_hider [with _CharT=char, _Traits=std::char
_traitschar, _Alloc=std::allocatorchar] matches the argument list
argument types are: (char *, std::allocatorchar)
  : _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { }
^
  detected during instantiation of std::basic_string_CharT, _Traits, _
Alloc::basic_string() [with _CharT=char, _Traits=std::char_traitschar, _Alloc
=std::allocatorchar] 

$ { echo '#include iostream'; echo '#include string'; echo
 'std::string test;'; }  e.cc

my first tries for the patched include files can be found here:
http://corecode.ath.cx/~corecode/stuff/icc-patched-includes-0.1.tgz

just extract and set this include dir before any other, (see above
command line).

[snipsnap error msgs] 
  (I'm waiting a little bit to see if I need to do something for the C++
  problem).
 
 I think this is not a problem which should get solved in the port, so I
 commit the new portrevision soon.

actually i think this should be saved in the port ;] but this will take
some time until there is a proper fix, so there is no real reason to
hold back this one current patch (not the one for the headers).

cheerz
  simon


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33216/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-03-31 Thread Simon 'corecode' Schubert

On Sun, 31 Mar 2002 14:01:00 -0800 Terry Lambert [EMAIL PROTECTED] wrote:

 Simon 'corecode' Schubert wrote:
  icc -I./include -I/usr/include -I/usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/
  3.0.4/include/g++  -I /usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/3.0.4/inclu
  de/g++/i386-portbld-freebsd5.0 -c e.cc
  e.cc:
  /usr/local/lib/gcc-lib/i386-portbld-freebsd5.0/3.0.4/include/g++/bits/basic_str
  ing.h, line 860: error: no instance of constructor std::basic_string_CharT, _
  Traits, _Alloc::_Alloc_hider::_Alloc_hider [with _CharT=char, _Traits=std::char
  _traitschar, _Alloc=std::allocatorchar] matches the argument list
  argument types are: (char *, std::allocatorchar)
: _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { }
  ^
detected during instantiation of std::basic_string_CharT, _Traits, _
  Alloc::basic_string() [with _CharT=char, _Traits=std::char_traitschar, _Alloc
  =std::allocatorchar]
 
 
 OK, this one is evil.
 
 There's code that assumes limk order here, and it seems that
 the library is at fault, or the order in which the static
 base class declarations are instantiated.
 
 Jeremey Allison and I had the same problem with ACAP under g++,
 when we were the first people to get it to compile, link, and
 run.  Doing this required multiple fixes:
[...]
 
 My main recommendation here is that the Moscow code is much
 better at this, since it has been pounded upon more than any
 other code in the same ecological niche, so using it instead
 is probably the right thing to do.
 
 Alternately, you could ensure ordering... by reordering the source
 code.  This seems like a poor idea, but it what Linux did implicitly,
 I think.  8-(.

first of all i'm taking this as an aprils fool (no offence if it was
none) ;]

and secondly i believe these templates don't get linked (all code within
the .h) so we should go another approach. (sorry, i'm not very creative,
including aprils fools)

cheerz
  simon


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33223/pgp0.pgp
Description: PGP signature


lang/icc doesn't compile c++ sources

2002-03-30 Thread Simon 'corecode' Schubert

hi hackers, alexander!

i've installed the icc port and trying to compile...
first of all, C source files compile (and then link with gcc). no
problems with that.

but i can't get icc to compile a single c++ source:
it always fails on the headers.

just a simple echo '#includeiostream'  comp.cc
won't compile. i've tested the include files of
o icc
o gcc 2.95.3 (the one from my base system, 4.5-S)
o gcc 3.0.4 (from the ports)

each one gives me a different error.

did anybody already solve this problem (by creating new headers?)
if so, please tell me!

if not, i'd like to work on that, but i don't know where to start.

cheerz
  simon
  

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33184/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-03-30 Thread Simon 'corecode' Schubert

On Sat, 30 Mar 2002 05:16:38 -0800 Terry Lambert [EMAIL PROTECTED] wrote:

 Simon 'corecode' Schubert wrote:
  just a simple echo '#includeiostream'  comp.cc
  won't compile. i've tested the include files of
  o icc
  o gcc 2.95.3 (the one from my base system, 4.5-S)
  o gcc 3.0.4 (from the ports)
  
  each one gives me a different error.
  
  did anybody already solve this problem (by creating new headers?)
  if so, please tell me!
  
  if not, i'd like to work on that, but i don't know where to start.
 
 Try this patch:
 
 --- bad Sat Mar 30 05:18:02 2002
 +++ goodSat Mar 30 05:18:23 2002
 @@ -1 +1,2 @@
 -echo '#includeiostream'  comp.cc
 +echo '#include iostream'  comp.cc
 +echo 'main() {}'  comp.cc
 
 
 8-) 8-) 8-)

;] no, that's definively not the problem.
as alexander wrote, there are several errors in cwchar etc...
go ahead and try yourself if you don't believe me...

cheerz
  simon


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33188/pgp0.pgp
Description: PGP signature


Re: lang/icc doesn't compile c++ sources

2002-03-30 Thread Simon 'corecode' Schubert

On Sat, 30 Mar 2002 12:17:17 -0800 Terry Lambert [EMAIL PROTECTED] wrote:

 Simon 'corecode' Schubert wrote:
   Try this patch:
  
   --- bad Sat Mar 30 05:18:02 2002
   +++ goodSat Mar 30 05:18:23 2002
   @@ -1 +1,2 @@
   -echo '#includeiostream'  comp.cc
   +echo '#include iostream'  comp.cc
   +echo 'main() {}'  comp.cc
  
  
   8-) 8-) 8-)
  
  ;] no, that's definively not the problem.
  as alexander wrote, there are several errors in cwchar etc...
  go ahead and try yourself if you don't believe me...
 
 I did: g++ complained about the lack of the space, and then
 complained about the lack of a main().  The patch fixed all
 the g++ complaints.

huh. mine does not:
$ echo '#includeiostream'comp.cc
$ gcc -c comp.cc
$

but that's not the point ;] icc will desperately fail on this because
the header files don't fit.
the headers coming with icc fit icc very well (of course) but don't fit
our system headers and the libs (some functions are being used in
templates which are not [yet?] implemented in our libc)
on the other hand, when i try using the g++ headers, icc will fail on
most gcc'isms that it doesn't understand.

i'm lost, really. which headers should i begin with and patch?

cheerz
  simon


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33203/pgp0.pgp
Description: PGP signature


bsd.prog.mk doesn't link c++ programs correctly?

2002-03-29 Thread Simon 'corecode' Schubert

hi hackers!

i'm in progress in writing a c++ program utilizing bsd.prog.mk

i wondered why my programs won't link correctly when i don't add a line
LDFLAGS=-lstdc++
no i was trying out gcc30 (whoa, slow!) and it didn't want to link with
or without the above line.

it seems c++ programs need to be linked via g++ (or c++).
after delting the above line and inserting a
CC=${CXX}
everything works fine, but that's not nice, of course.

is there any specific reason why linking is done with ${CC}?
there should be a way to tell that one needs ${CXX} for linkage.

cheerz
  simon

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg33181/pgp0.pgp
Description: PGP signature


Re: Performance of FreeBSD vs NetBSD (was: Re: Performance of -current vs -stable)

2002-03-11 Thread Simon 'corecode' Schubert

On Mon, 11 Mar 2002 07:10:31 -0800 (PST) Hiten Pandya [EMAIL PROTECTED] wrote:

 --- Luigi Rizzo [EMAIL PROTECTED] wrote:
  As I already asked:
  what compile time options were used in the two cases ?
  They surely can make a huge difference.
  
  cheers
  luigi
  
 
 Could it also be a possibility, that the NetBSD defaults differ from
 the FreeBSD defaults, I think this could make some difference too. :)

actually he mentioned in his post that he used the _same_ binary on fbsd
and netbsd (statically linked, netbsd with fbsd emu layer)


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg32695/pgp0.pgp
Description: PGP signature


Re: Swapping performance

2002-03-07 Thread Simon 'corecode' Schubert

On Thu, 7 Mar 2002 16:36:15 +0100 Erik Trulsson [EMAIL PROTECTED] wrote:

I've tested it with :

cc -O6 -o malloc_test malloc_test.c
   
   That -O6 does not look right from here.  Do we support anything over -O2?
  
  ISTR that -On is exactly the same for -O2 for n  2; or is this stale info?
  Maybe GCC 3.x supports higher optimization levels; still, I don't think
  this would make any significant difference.
 
 n  3 actually.  The difference between -O2 and -O3 is that -O3 enables
 inlining of functions. This usually makes the generated code larger,
 and sometimes faster (and sometimes slower.)
 
 FreeBSD does not officially support anything above -O since there have
 been reports of bad code generated when compiling with -O2 or higher.

to everybody who doesn't believe that: it really generates bad code.
i've been having severe problems with my tcp and udp stack lately (on a
i586/mmx machine). guess what, -O2 resulted in code which sometimes
generated bad tcp and/or udp checksums (depending on ip). i didn't
investigate any further, but believe me: not being able to access some
dns servers is a pain in the ass.

cheerz
  corecode

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg32583/pgp0.pgp
Description: PGP signature


Optimisation errors (Was: Swapping performance)

2002-03-07 Thread Simon 'corecode' Schubert

On Thu, 07 Mar 2002 10:49:22 -0800 Terry Lambert [EMAIL PROTECTED] wrote:

 Simon 'corecode' Schubert wrote:
  to everybody who doesn't believe that: it really generates bad code.
  i've been having severe problems with my tcp and udp stack lately (on a
  i586/mmx machine). guess what, -O2 resulted in code which sometimes
  generated bad tcp and/or udp checksums (depending on ip). i didn't
  investigate any further, but believe me: not being able to access some
  dns servers is a pain in the ass.
 
 Are you using NAT?

yep.

 The libalias incremental checksum calculation is incorrect;
 it assumes that a two's complement network order underflow
 will result in the same value as a one's complement host
 order underflow.  This results in off-by-one errors.

so is this an optimisation issue or not? when compiling with -O it works
again. furthermore i don't know if my bind uses the internal address or
the external one for queries.

 This is actually a *different* problem than the RFC 1624
 correction of RFC 1141 (also an off-by-one error).
 
 Have you used a recent version of ethereal?  It's an incredible
 bugger to get installed correctly for 4.5 or above, since you
 have to come from packages (the dependencies for the ports are
 incorrect), but it will tell you the correct checksum vs. the
 one that it got.
 
 There's also printing it out in tcp_input when you get a bad
 checksum.  If you see a lot of 0xfffe, then you'll know it's
 an off-by-one error.

yah, got lots of them, seen in tcpdump -vvvxXlei gif0 ;]

 If the problem is only on ACK packets... I can tell you that
 the tcp_respond() code path is not really throughly exercised.

tho i've seen these problems recently on UDP DNS lookups, too. then i
switched back to -O

cheerz
  corecode


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg32612/pgp0.pgp
Description: PGP signature


Re: How to write code in FreeBSD

2002-03-02 Thread Simon 'corecode' Schubert

On Sat, 02 Mar 2002 12:57:29 +0100 Aleksander Rozman - Andy [EMAIL PROTECTED] wrote:

 
 Hi !
 
 I was wondering if there are any guidelines how to write code in FreeBSD. I 
 have taken a look at several code of FreeBSD but each is written 
 differently? Problem is I don't know which is preferred way.

look at style(9)

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg32308/pgp0.pgp
Description: PGP signature


ipv6-over-ipv4 (gif) doesn't work right since 4.5

2002-02-23 Thread Simon 'corecode' Schubert

hi hackers!

i just updated to 4.5-S and my gif0 tunnel stopped working. the reason
is the following:
o before (= 4.4-S) i used
  route add -inet6 default -interface gif0
o now (= 4.5-S) i need to do
  route add -inet6 default ipv6-ptp-peer-addr

when using the old setting, the system won't notice incoming packets,
i.e. there will be a SYN-ACK but no reply; the ACK is being ignored;
system continues to send SYNs.

i believe this behavior is not desired: man route explicitely allows
using the iface name if it is a point to point interface.

is this a bug or some special feature?
if bug i'm gonna file a pr when i got time to do so.

cheerz
  corecode

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg32125/pgp0.pgp
Description: PGP signature


Re: stack alignment issues

2002-02-05 Thread Simon 'corecode' Schubert

On Mon, 04 Feb 2002 15:36:11 -0800 Terry Lambert
[EMAIL PROTECTED] wrote:

 Alfred Perlstein wrote:
   Well, if Linux aligns the initial stack, the chance that gcc will
   have auto-alignment added sounds to be about zero.  You might as
   well go ahead with your patch when you get a chance.
  
  I agree, either way we should try to optimized the current
  situation, especially if it seems to give a 2x perf boost!
 
 How about aligning the initial stack?

i think this is a good idea (besides trying to optimize gcc).
and it shouldn't be too hard to accomplish this (i don't know the code for rtld, but 
it really shouldn't be too hard to do this)
unfortunately i don't have time ATM otherwise i'd look into this

cheerz
  corecode 


-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg31490/pgp0.pgp
Description: PGP signature


Re: buildworld via ro mounted /usr/src

2002-02-02 Thread Simon 'corecode' Schubert

On Fri, 1 Feb 2002 15:03:32 -0800 Crist J. Clark
[EMAIL PROTECTED] wrote:

  The build procedure should be done as usual --
  # make (env variables if not given in /etc/make.conf) -j4 buildworld
  # make KERNCONF=FreeBEER KERNCONFDIR=/usr/local/etc/conf -j4
  buildkernel# make KERNCONF=FreeBEER KERNCONFDIR=/usr/local/etc/conf
  installkernel and so on...
 
 No, I was confused. I thought we were discussing how to do an old
 fashioned kernel build in a read-only /usr/src/sys.

thanks for your replies ;]
actually the main problem was make needing MAKEOBJDIRPREFIX set as env var. perhaps 
there is a way to specify something like WRKDIRPREFIX (ports') for bsd.obj.mk.
after setting MAKEOBJDIRPREFIX to the right path and really cleaning /usr/src i was 
able to build world + kernel on a readonly /usr/src. though i needed to do
env MAKEOBJDIRPREFIX=/usr/obj/i386/k7 make buildworld -j4
 builds bootstrap tools, somewhere bails out on a rm i think.
env MAKEOBJDIRPREFIX=/usr/obj/i386/k7 make buildworld -j4 -DNOCLEAN
 then works as desired.
env MAKEOBJDIRPREFIX=/usr/obj/i386/k7 make buildkernel -j4
 works right out-of-the-box.

cheerz
  corecode

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg31353/pgp0.pgp
Description: PGP signature


buildworld via ro mounted /usr/src

2002-01-30 Thread Simon 'corecode' Schubert

hello everybody!

i am trying to accomplish this (should be fairly easy) task:

cvsupping /usr/ports  /usr/src on a central file server.

and building world/kernel via nfs mounts.
in order not to get things mixed up i share /usr/ports and /usr/src ro and 
/usr/ports/distfiles, /usr/obj rw.

should work as desired:
WRKDIRPREFIX set to a reasonable value (depending on arch and cpu) and 
MAKEOBJDIRPREFIX too.

but *somehow* some tools appear to be built into /usr/src and not into /usr/obj (as it 
should be). might be that's just the bootstrapping tools, but why? and how do i change 
this behavior?

i didn't find a good (any) guide to this on the net. reading makefiles also didn't 
give me any conclusion.

thanks in advance,
cheerz
  simon

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg31253/pgp0.pgp
Description: PGP signature


Re: boot0/boot0.s

2001-12-20 Thread corecode

On Thu, 20 Dec 2001 11:58:12 +0800 Leslie Jackson [EMAIL PROTECTED]
wrote:

 That means that BIOS saves the current drive number in register %dl??
 
 Could you give a hint about _where_ BIOS stores _what_??
 I've searched the google.com, but got no valuable resource.

a great tool for system near stuff is the intlist by ralph brown:
http://www-2.cs.cmu.edu/afs/cs/user/ralf/pub/WWW/files.html

here you can find a HTMLized version:
http://www.ctyme.com/rbrown.htm

and here stuff specific to your question. don't let it irritate you, the
BIOS does the same on power on and INT 19 except for some more init on
power on that does not affect the boot strapping:
http://www.ctyme.com/intr/rb-2270.htm


cheerz
  corecode
-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg30310/pgp0.pgp
Description: PGP signature


Re: Thanx and another question

2001-12-20 Thread corecode

On Thu, 20 Dec 2001 14:2:16 +0800 Leslie Jackson [EMAIL PROTECTED]
wrote:

 Now i think i've got a basic knowledge about the BIOS data area.
 But reading the code of boot0.s, i got another question as in the
 following code:
 
 main.5:   incw dx # Next item 
   addb $0x10,bl   # Next entry
   jnc main.3  # Till done
 
 The partition table in MBR only has 4 items, why check for 16 times??

it doesn't check for 16. it adds 0x10 to bl and if bl overflows (prolly
the end of the partition table. as sizeof(ever entry) == 0x10 and the 4th
ends at 0x1fc another (a 5th) increment will overflow bl and result in a
set carry flag.

hope this helps

cheerz
  corecode

-- 
/\   http://corecode.ath.cx/
\ /
 \ ASCII Ribbon Campaign
/ \  Against HTML Mail and News



msg30311/pgp0.pgp
Description: PGP signature