Re: [9fans] pow10.c missing from plan9port [was: p9pow10?]

2010-07-22 Thread Eoghan Sherry
On 22 July 2010 03:28, EBo  wrote:
> Maybe Russ can add it to plan9port ;-)

Check out codereview(1) and hg(1). You'll need a tree from the Mercurial
repository at http://code.swtch.com/plan9port.

Eoghan



Re: [9fans] p9p installation err: conflicting types

2010-07-11 Thread Eoghan Sherry
On 11 July 2010 11:50, Bjartur Thorlacius  wrote:
> tar.c:426: error: conflicting types for 'strnlen'
> /usr/include/string.h:404: error: previous declaration of 'strnlen' was here

This was fixed some time ago:
http://code.swtch.com/plan9port/diff/src/cmd/tar.c?diff2=3bc490577d95&diff1=adde59fe69bf

Grab an updated tree from http://swtch.com/plan9port/.

By the way, there's a mailing list specific to p9p at
http://groups.google.com/group/plan9port-dev.

Eoghan



Re: [9fans] acme(4) and addr=dot

2010-03-06 Thread Eoghan Sherry
> % {echo 'addr=dot'; 9p read acme/70/addr >[1=2]} | 9p write acme/70/ctl
>  0   0 %
>
> No help.  Am I doing something wrong?

Addr is reset to 0,0 once opened. So, you need to perform these
operations in order: open addr; write ctl; then read addr.

There's a nice way to do this if you can give rc access to the acme
files (try 9pfuse(4) with FUSE).

;9pfuse unix!`{namespace}^/acme mnt
;>mnt/1/ctl;
cat;
}
 93 234 ;

By the way, your question motivated me to give 9pfuse a try. Also,
it lead to my realization that, in rc, you can put the redirections
in front of the command. Hooray!

Eoghan



Re: [9fans] keyboard events in sam

2009-12-07 Thread Eoghan Sherry
The keyboard is handled in src/cmd/devdraw which could be considered
the plan9port
equivalent of the Plan 9 kernel (at least the keyboard, mouse, and
graphics part).

The X11 version of devdraw maps the X notion of a keyboard to the Plan 9 one in
__xtoplan9kbd (src/cmd/devdraw/x11-itrans.c).
In particular, this function contains,

/* Do control mapping ourselves if translator doesn't */
if(e->xkey.state&ControlMask && k != Kalt)
k &= 0x9f;

So, for instance, Ctrl-[0Pp] all map to 0x10.

Not sure what the convention should be, but that's where it's enforced.

Eoghan



Re: [9fans] Newbie question

2009-04-21 Thread Eoghan Sherry
2009/4/21 philo...@juno.com :
> Could someone be kind enough to remind me how I gain access
> to protected folders such as /lib and /bin

You want to add yourself to the group sys on the file server (fossil).
The wiki explains how with links to relevant man pages:
http://www.plan9.bell-labs.com/wiki/plan9/Adding_a_new_user

eoghan



Re: [9fans] bitsy anyone?

2008-10-21 Thread Eoghan Sherry
2008/10/21 Benjamin Huntsman <[EMAIL PROTECTED]>:
>>"add ramdisk0x020 0x080",
>
> I believe the command in question is:
> partition define ramdisk 0x20 0x60 0
>
> I had changed it to 0x80 too, but still got the kernel panic...
> I'll take a look in paq.c and see if I can fix the hard-coded sizes.

The boot loader command,
partition define ramdisk 0x20 0x60 0
is correct. The change is to paq.c.

The boot loader uses start+size while Plan 9 uses
[start,end) to define partitions.
The instructions on the wiki describe a 6 MB ramdisk starting
2 MB into the flash.
To the boot loader that is 0x20+0x60 but to Plan 9
it is [0x20,0x80).
The problem is paq.c defines a [0x20,0x60) ramdisk
which is only 4 MB in size.

Comparing the values in paq.c with those on the wiki should make
things clear.

eoghan



Re: [9fans] bitsy anyone?

2008-10-21 Thread Eoghan Sherry
> However, I had some problems when uploading the paqdisk
> on the iPaq when the image file is larger than 4 MB. The image
> seems to be corrupted during the upload on the iPaq and Plan 9
> crash during boot. This problem does not appear with a smaller paqdisk.

I don't have a Plan 9 system or a bitsy at hand but I remember
running into this. The hard coded partition definition is fparts in
/sys/src/9/boot/paq.c. The ramdisk partition is defined to be 4 MB although the
various documents imply it should be 6 MB.

I recall simply changing the ramdisk entry to,
"add ramdisk0x020 0x080",
allowed me to use larger images.

Hope this helps,
eoghan