pkill long format failure

2012-12-06 Thread Alexander Hall
If, between the internal grep'ing and the printout, a process has
disappeared, we currently get an empty line and pgrep will return
nonzero.

This makes it, IMHO, behave somewhat better.

OK? Better wording? Could there be other reasons kvm_getargv fails?

/Alexander


Index: pkill.c
===
RCS file: /data/openbsd/cvs/src/usr.bin/pkill/pkill.c,v
retrieving revision 1.30
diff -u -p -r1.30 pkill.c
--- pkill.c 21 Aug 2012 10:32:38 -  1.30
+++ pkill.c 6 Dec 2012 09:47:39 -
@@ -470,15 +470,15 @@ grepact(struct kinfo_proc *kp, int print
if (printdelim)
fputs(delim, stdout);
if (longfmt  matchargs) {
-   if ((argv = kvm_getargv(kd, kp, 0)) == NULL)
-   return (-1);
-
-   printf(%d , (int)kp-p_pid);
-   for (; *argv != NULL; argv++) {
-   printf(%s, *argv);
-   if (argv[1] != NULL)
-   putchar(' ');
-   }
+   if ((argv = kvm_getargv(kd, kp, 0)) != NULL) {
+   printf(%d , (int)kp-p_pid);
+   for (; *argv != NULL; argv++) {
+   printf(%s, *argv);
+   if (argv[1] != NULL)
+   putchar(' ');
+   }
+   } else
+   printf(%d (terminated), (int)kp-p_pid);
} else if (longfmt)
printf(%d %s, (int)kp-p_pid, kp-p_comm);
else



drm@macppc, please test

2012-12-06 Thread Martin Pieuchot
Hey,

I've just committed the last part of the work I started during g2k12 and
I would really appreciate some more tests before enabling drm(4) on
macppc.

- First of all you need a machine with a G3 or G4 processor and a Radeon
  graphic card.

- Then update your source tree to -current and make sure it is current
  enough (you must have /sys/dev/agp.c rev 1.36).

- If you don't have them already, make sure to create /dev/agp0 and
  /dev/drm0 using the appropriate MAKEDEV(8).

- Start by building a GENERIC kernel and make sure it works as expected.

- If everything went fine, you can now muild a custom kernel with:

#option DRMDEBUG
radeondrm*  at vgafb?   # ATI Radeon DRM driver
drm*at radeondrm?


After rebooting, start X and enjoy! If X starts correctly, please look
at your Xorg.0.log, if it says something like:

...
[   908.296] (II) RADEON(0): AGP card detected
...
[   908.499] (II) RADEON(0): [dri] Found DRI library version
1.3.0 and kernel module version 1.31.0
...
[   909.542] (II) RADEON(0): Direct rendering enabled

you should be using accelerated video using the DRI ;) Now the usual
test program is:

$ glxgears -info

If it works for you, I would be pleased to hear it, otherwise try to
rebuild a custom kernel with the DRMDEBUG option and send me your
dmesg, Xorg.0.log and /var/log/messages with the drm vomit in it.


Some known issues:
 
 - If you cannot see some fonts in your favorite gtk application, you
   need to update to a more recent xenocara snapshot or at least update
   and reinstall the xf86-video-ati driver.

 - Sadly, OpenGL does not work with our UMS drivers see the links below
   for more information:
 https://bugs.freedesktop.org/show_bug.cgi?id=26496
 https://bugs.freedesktop.org/show_bug.cgi?id=37166

 - With some of my PowerBooks (with r300), the console is not restored
   correctly when exiting X.


Finally if you test this stuff, I would like to know which AGP revision
and graphic card you are using, please include the output of the
following command in your report:

 $ dmesg |grep -e ^vgafb -e uni-n rev

Martin



Re: drm@macppc, please test

2012-12-06 Thread Landry Breuil
On Thu, Dec 06, 2012 at 05:53:05PM +0100, Martin Pieuchot wrote:
 Hey,
 
 I've just committed the last part of the work I started during g2k12 and
 I would really appreciate some more tests before enabling drm(4) on
 macppc.
 
 - First of all you need a machine with a G3 or G4 processor and a Radeon
   graphic card.
 
 - Then update your source tree to -current and make sure it is current
   enough (you must have /sys/dev/agp.c rev 1.36).
 
 - If you don't have them already, make sure to create /dev/agp0 and
   /dev/drm0 using the appropriate MAKEDEV(8).
 
 - Start by building a GENERIC kernel and make sure it works as expected.
 
 - If everything went fine, you can now muild a custom kernel with:
 
   #option DRMDEBUG
   radeondrm*  at vgafb?   # ATI Radeon DRM driver
   drm*at radeondrm?

Still works fine for me on macppc mini  ibook g4, this time without
xorg.conf forcing the BusType to PCI

# ibook
memc0 at mainbus0: uni-n rev 0xd2
appleagp0 at pchb0
agp0 at appleagp0: aperture at 0x0, size 0x1000
vgafb0 at pci0 dev 16 function 0 ATI Radeon Mobility 9200 rev 0x01, mmio
radeondrm0 at vgafb0: irq 48
drm0 at radeondrm0

20:44] gail:~/ $DISPLAY=:0 xdriinfo
Screen 0: r200
[20:44] gail:~/ $DISPLAY=:0 glxgears -info
GL_RENDERER   = Mesa DRI R200 (RV280 5C63) AGP 4x  TCL

# mini
memc0 at mainbus0: uni-n rev 0xd2
appleagp0 at pchb0
agp0 at appleagp0: aperture at 0x0, size 0x1000
vgafb0 at pci0 dev 16 function 0 ATI Radeon 9200 rev 0x01, mmio
radeondrm0 at vgafb0: irq 48
drm0 at radeondrm0

20:46] mikey:~/ $DISPLAY=:0 xdriinfo
Screen 0: r200
[20:46] mikey:~/ $DISPLAY=:0 glxgears -info
GL_RENDERER   = Mesa DRI R200 (RV280 5962) AGP 4x  TCL

Full dmesg/xorg.0.log available if needed.

You've just tripled the amount of boxes drm-enabled here, thx!

Landry



Re: drm@macppc, please test

2012-12-06 Thread Jérémie Courrèges-Anglas
Hi,

this is seems to work as expected, known issues included.
glxgears runs OK but displays some artifacts, and the console is full of
garbage after exiting X.

I've put the dmesg, Xorg.0.log, etc here:

http://autogeree.net/~jca/tmp/g4-drm/

Thanks a lot, it's quite nice to have DRI. :)

-- 
Jérémie Courrèges-Anglas
GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494