Re: VMWARE GSX Port?

2006-02-28 Thread Seán C . Farley

On Tue, 28 Feb 2006, Mike Silbersack wrote:


On Sat, 25 Feb 2006, Scott Long wrote:


Ashok Shrestha wrote:

VMWARE GSX was released recently for free.
[http://www.vmware.com/news/releases/server_beta.html]

Is anyone working on a port for this?


I've started on it, but I haven't made much progress yet.


Anyone who's interested in working on it should make sure to start
with the VMWare 3 port (which works at present), and Orlando's beta
4.5 port:

http://www.break.net/orlando/freebsd.html


Also, check out Wietse Venema's changes[1] done on top of Orlando's
work.

Seán
  1. 
http://lists.freebsd.org/pipermail/freebsd-emulation/2006-February/001843.html
--
[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: Number of kevents registered in kqueue

2005-12-16 Thread Seán C . Farley

On Fri, 16 Dec 2005, Dan Nelson wrote:


In the last episode (Dec 16), Sen C. Farley said:

I may have missed it in the man page, but I am unable to find a way
to determine how many kevents are currently registered within a
kqueue.  If there is no method for a count, how about a way to find
if a kqueue is empty or not.  Besides tracking what events are still
within a kqueue, this would make for an easier way to write an event
loop.  Currently, calling kevent() on an empty kqueue will still
block.


I don't think there's a way currently.  What I did in my local tree is
modify kern_kevent so that if the magic number -1 is passed in as
nchanges, it will return the entire queued event list back to the
caller in *eventlist, and return the number of events as the
returncode.  Very useful for debugging kqueue-using programs where you
want to compare what you think you're waiting for, and what the kernel
thinks you're waiting for :)


Why does this pop in my mind when reading your reply?  :)
Lt. Saavik:  You lied.
Spock:   I exaggerated.

In other words, there does not currently exist a method to does this on
a vanilla system.  I can deal with that.  It still would be a nice
feature to have.

Seán
--
[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: Number of kevents registered in kqueue

2005-12-16 Thread Seán C . Farley

On Fri, 16 Dec 2005, Václav Haisman wrote:


Seán C. Farley wrote:

I may have missed it in the man page, but I am unable to find a way
to determine how many kevents are currently registered within a
kqueue.  If there is no method for a count, how about a way to find
if a kqueue is empty or not.  Besides tracking what events are still
within a kqueue, this would make for an easier way to write an event
loop.  Currently, calling kevent() on an empty kqueue will still
block.





I was working with it recently and my understanding is that if you
want to retrieve any events and not block if there are none then you
should give it zeroed struct timespec. Quote from the man page:

"If timeout is a NULL pointer, kevent() waits indefinitely.  To effect
a poll, the timeout argument should be non-NULL, pointing to a
zero-valued timespec structure."


I understand about the timeout.  I am looking for different methods to
break out of a loop where I want to remain until all events are handled
and deleted from the kqueue.

Seán
--
[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: Number of kevents registered in kqueue

2005-12-16 Thread Seán C . Farley

On Fri, 16 Dec 2005, John-Mark Gurney wrote:


Seán C. Farley wrote this message on Fri, Dec 16, 2005 at 16:09 -0600:

I may have missed it in the man page, but I am unable to find a way
to determine how many kevents are currently registered within a
kqueue.  If there is no method for a count, how about a way to find
if a kqueue is empty or not.  Besides tracking what events are still
within a kqueue, this would make for an easier way to write an event
loop.  Currently, calling kevent() on an empty kqueue will still
block.


Why do you need this?  What is the point of calling kevent if you
don't have an event to wake it up?  Can you give us an example of
where you need to know that there isn't any events in the queue?  (I
can't think of one, since using kqueue w/o events is pointless.)  I
can't see how tracking the count will let you know which events are
still in the kqueue... (second to last sentence)


If you register a number of events to be handled by a single kevent-loop
and they are deleted (by kevent() or EV_ONESHOT), it would be nice for a
way to see if there are any more kevents registered in the kqueue when
deciding to exit the loop (or program) or performing some special
operation when all events are gone.


Also, I recommend that the man page mention that a kqueue may be
close(2)'d.  The only reference that it can be is that the manual
page says the kqueue() call returns a descriptor.


I would think that it would need to be documented when you can't close
a descriptor..  Neither pipe nor socketpair documents that close can
be called on them...


Good point.  It was just a thought for us beginners to kevents.  The
other calls have a multitude of sources for documentation.

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

Number of kevents registered in kqueue

2005-12-16 Thread Seán C . Farley

I may have missed it in the man page, but I am unable to find a way to
determine how many kevents are currently registered within a kqueue.  If
there is no method for a count, how about a way to find if a kqueue is
empty or not.  Besides tracking what events are still within a kqueue,
this would make for an easier way to write an event loop.  Currently,
calling kevent() on an empty kqueue will still block.

Also, I recommend that the man page mention that a kqueue may be
close(2)'d.  The only reference that it can be is that the manual page
says the kqueue() call returns a descriptor.

Seán
--
[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: VIA 6420 RAID 0 problem

2005-11-21 Thread Seán C . Farley

On Tue, 22 Nov 2005, Marcin Simonides wrote:


I have (had?) two issues, perhaps connected:
(I posted a question to freebsd-questions about it some time ago. It
contains some additional information: 
http://lists.freebsd.org/pipermail/freebsd-questions/2005-November/103991.html)





The other, perhaps connected with this, issue is that I lost an
extended partition while creating FreeBSD partition. It had happened
before I started trying to fix the size problem described above.

After slicing the newly created RAID 0 array with sysinstall and
installing Windows, formatting NTFS and FAT slices (with Windows) I
created BSD partitions on the first slice and lost the extended
partition (slice). (a more detailed description of what I did is in
the original posting to freebsd-questions).

Today, after the change in kernel, I have removed FreeBSD partitions
from the first slice and recreated them (with some differences).
Nothing wrong happened.

Could this be connected with the bug in VIA ata raid driver? Or maybe
it was just a coincidence and/or was entirely my fault?


With the partition corruption (all of them) in a slice I reported[1] to
stable@ with the same controller, I think I smell a bug.  I do not know
if it is a VIA hardware bug or a bug in the driver.

Seán
  1. http://lists.freebsd.org/pipermail/freebsd-stable/2005-November/019900.html
--
[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: [FreeBSD-Announce] New Logo

2005-11-03 Thread Seán C . Farley

On Tue, 1 Nov 2005, Branson Matheson wrote:


On Tue, Nov 01, 2005 at 04:50:43PM +0100,Ivan Voras did mutter:

Man, I _so_ hope this is a joke...


Agreed. The "logo" looks like some anime rendering of a sea mine, and
the font really doesn't agree with it.


Since there has been a plethora of negative.. i thought i'd add my
2cents..  I think the new logo is pretty cool. Modern and artsy. The
font is a bit to curved for my tastes .. but it does hilight the
circular direction of the font ..etc.

Definately keeps with the roots of our Daemon .. while showing we can
evolve and be more modern. Kudos to the artist and the selecton crew.


I also like it.  OTOH, it reminds me a little of the Saturday morning
(or maybe everyday?) block of kids shows mascot (JETIX[1]).  Some JETIX
images without the feet:  [2] and [3].

When looking at the bottom of the winning example page[4], I like the
look of the two overlapping images in the bottom-left.  It almost
appears that the bottom layer logo has grown a tail.

Seán
  1. http://www.prof1c.ru/tv/images/ch/Jetix.JPG
  2. http://www.thecharactershop.co.uk/portfolio/images/jetix-1.jpg
  3. http://www.thecharactershop.co.uk/portfolio/images/jetix-4.jpg
  4. http://logo-contest.freebsd.org/result/640-1.png
--
[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: Vertikal and Horizontal Scroll of (mighty) mice

2005-08-25 Thread Seán C . Farley

On Thu, 25 Aug 2005, Arne Schwabe wrote:


Hi,

I just got myself myself a shiny white Mighty Mouse from Apple.

I now have the Problem that Wheel if the scrolling to left and right.
I fixed this by teaching ums.c to prefer WHEEL over Z but it would be
nice to support both wheel and z axis scrolling. I checked the
mouse(4) but the dataformat there does not even support a forth axis.
Hacking ums.c to map z axis to buttons 7 and 8 would be possible, but
not a clean solution. Another Option would be to add a z2 axis or
something tothe SYSMOUSE format.

What are your opinion?


I have an MX1000[1] from Logitech with many buttons and a wheel.  The
wheel can scroll up and down and "click" left and right.  The PS/2
driver did not support enough of its buttons which caused moused to not
see all of the buttons.  I recommend looking at this first link since it
details one way of setting up a mouse with many buttons.

I used the ums driver, but I had to enable more buttons in the
driver[2].  You may need that patch to use it fully, but I do not know
how many logical buttons you have.

In X, you will need to configure the mouse with xmodmap.  Here is my
line to my mouse to do most of what I want.  It moves the paste action
to the button above the wheel instead of the click of the wheel.

xmodmap -e "pointer = 1 7 3 9 10 6 2 8 4 5 11 12"

Here is the mouse in xorg.conf:
Section "InputDevice"
Identifier  "Mouse0"
Driver  "mouse"
Option  "Protocol" "auto"
Option  "Device" "/dev/ums0"
Option  "Buttons" "12"
Option  "Emulate3Buttons" "false"
Option  "ZAxisMapping" "9 10"
EndSection

Seán
  1. http://floam.sh.nu/index.xhtml?page=guides§ion=mx1000
  2. http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/83353
--
[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: Converting libfoo.so for linux to freebsd

2005-08-09 Thread Seán C . Farley

On Tue, 9 Aug 2005, M. Warner Losh wrote:


I have recently purcahsed a device that comes with a .so for linux,
but no sources.  Is there any way one can take an arbitrary linux .so
which appears to have no dependencies to a FreeBSD .so?  The binary
code is about 20k or so.

Alternatively, anybody know how to take a linux .so and generate a .s
that can be fed into the linux toolchain to generate a new .so...


Although I have never tried it, I had read somewhere that you could
possibly convert a Linux .so using objcopy.

Found it:
http://groups-beta.google.com/group/fa.freebsd.questions/browse_frm/thread/2c1ce35fab83427/7add378b8e5a7006

I am curious if it works for you too.

Seán
--
[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: Using a logitech mx700 with scrollwheel _and_ thumb buttons

2005-07-10 Thread Seán C . Farley

On Wed, 6 Jul 2005, Julian Elischer wrote:


Joe Schmoe wrote:





Nope.  I reproduced these same settings _exactly_, and
they produce the same results.

With your settings above, the scroll wheel works fine,
and the two thumb buttons each cause the web page to
scroll very slightly downward.  This is the same thing
they did with all the other different configurations I
tried.

Why is using mouse thumb buttons under FreeBSD _rocket
science_ ?  Why is this a _hard problem_ ?


because no-one who has the interest in fixing it has the time
to do so and visa versa.


I do not know how to fix it using the psm driver, but here is what I did
with the Logitech MX 1000 I bought over the weekend.

I tried using the psm driver, but it claimed a maximum of seven buttons
while this mouse has twelve according to one source[1].  I then tried
the ums driver, yet it also claimed only seven buttons.  Fortunately, I
found a NetBSD PR (kern/30248 [2]) concerning the button limit in the
ums driver.  Since sc_buttons is an int, I just bumped up MAX_BUTTONS to
31, and the driver found 16 buttons.

xorg.conf mouse section:
Section "InputDevice"
Identifier  "Mouse0"
Driver  "mouse"
Option  "Protocol" "auto"
Option  "Device" "/dev/ums0"
Option  "Buttons" "12"
Option  "Emulate3Buttons" "false"
Option  "ZAxisMapping" "9 10"
EndSection

Although I disabled the moused loading in /etc/usbd.conf to allow X to
capture the device, moused may still work.  I doubt it, but is there a
way to disable a particular check via rc.conf?

With the following xmodmap command, I have a fair amount of the mouse
working:
xmodmap -e "pointer = 1 2 3 9 10 6 7 8 4 5 11 12"

Problems:
1. psm has a limit to the number of buttons detected.  I noticed this
   when I used moused in debug mode to see what events were thrown from
   the mouse.
2. The wheel pushed to the left and right does not work.  It does not
   show up in xev.  I may need to play with xorg.conf some more.
3. I need to find a way to disable Logitech's "Cruise Control" since I
   want to use the scroll up button above the wheel as the paste button.
   Cruise Control send the button number I want (7) plus a continuous
   stream of the button number (4) related to the wheel.

   I hate pasting with a wheel; I am almost always screwing something
   up during the paste due to slipping on the wheel.  :)
4. I have no idea what the (magic number) button positions in xmodmap
   correspond with.  I.e., 2 means paste, but what does 4 and on mean?

Would anyone like to up the MAX_BUTTONS define in ums.c to a higher
number, please?

Seán
  1. http://floam.sh.nu/index.xhtml?page=guides§ion=mx1000
  2. http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=30248
--
[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: How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Seán C . Farley

On Mon, 27 Jun 2005, Darren Pilgrim wrote:


From: Niki Denev [mailto:[EMAIL PROTECTED]

Darren Pilgrim wrote:

There are some conditions to the task given by the subject:

1: The interface must be present at boot.
2: Use of /etc/rc.d scripts to start and stop the interface is
desirable.

The first condition poses no problem, just don't include the
relevant ifconfig_ifn line in /etc/rc.conf and the interface won't
be configured. But rc.d/dhclient and rc.d/netif won't work without
an ifconfig line for the interface.

Adding the ifconfig line and then listing every interface but the
one I want configured in network_interfaces does prevent it from
being configured at boot while having an ifconfig line in rc.conf,
but if I try to use rc.d/netif to start the interface, rc.d/netif
does nothing because it tests the interface against the contents of
network_interfaces and cloned_interfaces, so the interface I left
out will be excluded.

Have I overlooked an option somewhere?


What happens if you configure the interface in 'down' state, like :

ifconfig_fxp0="inet 192.168.0.10 netmask 0xff00 down"


Then rc.d/dhclient won't work.  The "DHCP" keyword must be present in
the ifconfig line in order for dhcpif to test true.  A similar logic
is in place for wpaif based on the "WPA" keyword.


I am not sure it will help, but have you tried playing with
/etc/start_if.DEVICE scripts?  I do not know where they are documented,
but you can configure a network device this way.  I used it in the past
to change the MAC address on a NIC at boot before the card was
configured in rc.conf.

Seán
--
[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: To C++ or not to C++

2005-06-24 Thread Seán C . Farley

On Fri, 24 Jun 2005, Ryan Sommers wrote:


Greetings all... I'm about to undertake a major software engineering
project and I can't decide between C or C++ and was wondering if I
could get some input from the community.

As part of this project I'm going to need to make use of at least 2 C
libraries (OpenSSL and ncurses) and the application must be compatible
with the standard range of Linux/UNIX compilers and operating systems.
All of these signs make me sway closer to just doing it in C. However,
one strong point always seems to pull me back to C++, constructors and
destructors.

Constructors and destructors can offer so much in the way of memory
leak avoidance. Of course, each language can leak memory like a sieve
if used improperly. However, for statically allocated structures
semi-automatic garbage collection can be a nice cushion.

Anyway, without getting into too much detail. Anyone had to make this
choice on a project? What were your thoughts in retrospect? What would
you have done different, what would stay the same...

PS For this project things like polymorphisms and inheritance really
aren't needed.


If you would like to use C but want some sort of memory handling, I can
recommend using the Apache Portable Runtime (APR) in
/usr/ports/devel/apr which uses memory pools.  Although I have not used
it before, there is also the Boehm Garbage Collector found in
/usr/ports/devel/boehm-gc.

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