Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 14:34:54 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@FreeBSD.org
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Konstantin Belousov <kib@FreeBSD.org>
Subject:   Re: svn commit: r199418 - head/sys/dev/syscons
Message-ID:  <200911171434.56358.jkim@FreeBSD.org>
In-Reply-To: <200911171924.nAHJOQIh032544@svn.freebsd.org>
References:  <200911171924.nAHJOQIh032544@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary-00=_grvALVEc9GqwctC
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 17 November 2009 02:24 pm, Konstantin Belousov wrote:
> Author: kib
> Date: Tue Nov 17 19:24:26 2009
> New Revision: 199418
> URL: http://svn.freebsd.org/changeset/base/199418
>
> Log:
>   Fix pgsignal() call after signature change in r199355.
>
>   Reported and tested by:	bf1783 googlemail com
>   MFC after:	1 month
>
> Modified:
>   head/sys/dev/syscons/scvidctl.c
>
> Modified: head/sys/dev/syscons/scvidctl.c
> ===================================================================
>=========== --- head/sys/dev/syscons/scvidctl.c	Tue Nov 17 18:57:44
> 2009	(r199417) +++ head/sys/dev/syscons/scvidctl.c	Tue Nov 17
> 19:24:26 2009	(r199418) @@ -321,6 +321,7 @@
> sc_set_pixel_mode(scr_stat *scp, struct return ENODEV;
>  #else
>      video_info_t info;
> +    ksiginfo_t ksi;
>      u_char *font;
>      int prev_ysize;
>      int error;
> @@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct
>  	tp->t_winsize.ws_col = scp->xsize;
>  	tp->t_winsize.ws_row = scp->ysize;
>  	if (tp->t_pgrp != NULL) {
> +	    ksiginfo_init(&ksi);
> +	    ksi.ksi_signo = SIGWINCH;
> +	    ksi.ksi_code = SI_KERNEL;
>  	    PGRP_LOCK(tp->t_pgrp);
> -	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
> +	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
>  	    PGRP_UNLOCK(tp->t_pgrp);
>  	}
>      }

Probably you wanted this:

--- sys/dev/syscons/scvidctl.c
+++ sys/dev/syscons/scvidctl.c
@@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
     return ENODEV;
 #else
     video_info_t info;
-    ksiginfo_t ksi;
     u_char *font;
     int prev_ysize;
     int error;
@@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
        || tp->t_winsize.ws_row != scp->ysize) {
        tp->t_winsize.ws_col = scp->xsize;
        tp->t_winsize.ws_row = scp->ysize;
-       if (tp->t_pgrp != NULL) {
-           ksiginfo_init(&ksi);
-           ksi.ksi_signo = SIGWINCH;
-           ksi.ksi_code = SI_KERNEL;
-           PGRP_LOCK(tp->t_pgrp);
-           pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
-           PGRP_UNLOCK(tp->t_pgrp);
-       }
+
+       tty_signal_pgrp(tp, SIGWINCH);
     }
 
     return 0;
------------------------------------------------------------------

In fact, it seems it was missed in r181905.

Jung-uk Kim

--Boundary-00=_grvALVEc9GqwctC
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="scvidctl.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="scvidctl.c.diff"

--- sys/dev/syscons/scvidctl.c
+++ sys/dev/syscons/scvidctl.c
@@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
     return ENODEV;
 #else
     video_info_t info;
-    ksiginfo_t ksi;
     u_char *font;
     int prev_ysize;
     int error;
@@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
 	|| tp->t_winsize.ws_row != scp->ysize) {
 	tp->t_winsize.ws_col = scp->xsize;
 	tp->t_winsize.ws_row = scp->ysize;
-	if (tp->t_pgrp != NULL) {
-	    ksiginfo_init(&ksi);
-	    ksi.ksi_signo = SIGWINCH;
-	    ksi.ksi_code = SI_KERNEL;
-	    PGRP_LOCK(tp->t_pgrp);
-	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
-	    PGRP_UNLOCK(tp->t_pgrp);
-	}
+
+	tty_signal_pgrp(tp, SIGWINCH);
     }
 
     return 0;

--Boundary-00=_grvALVEc9GqwctC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911171434.56358.jkim>