mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Fix GIO_ATTR ioctl return to match SYSV
This commit is contained in:
parent
49a598ab87
commit
58db4b5a8f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17340
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.158 1996/06/27 21:36:11 joerg Exp $
|
||||
* $Id: syscons.c,v 1.159 1996/07/01 20:28:38 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -659,7 +659,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
switch (cmd) { /* process console hardware related ioctl's */
|
||||
|
||||
case GIO_ATTR: /* get current attributes */
|
||||
*(int*)data = scp->term.cur_attr;
|
||||
*(int*)data = (scp->term.cur_attr >> 8) & 0xFF;
|
||||
return 0;
|
||||
|
||||
case GIO_COLOR: /* is this a color console ? */
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.158 1996/06/27 21:36:11 joerg Exp $
|
||||
* $Id: syscons.c,v 1.159 1996/07/01 20:28:38 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -659,7 +659,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
switch (cmd) { /* process console hardware related ioctl's */
|
||||
|
||||
case GIO_ATTR: /* get current attributes */
|
||||
*(int*)data = scp->term.cur_attr;
|
||||
*(int*)data = (scp->term.cur_attr >> 8) & 0xFF;
|
||||
return 0;
|
||||
|
||||
case GIO_COLOR: /* is this a color console ? */
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.158 1996/06/27 21:36:11 joerg Exp $
|
||||
* $Id: syscons.c,v 1.159 1996/07/01 20:28:38 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -659,7 +659,7 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
switch (cmd) { /* process console hardware related ioctl's */
|
||||
|
||||
case GIO_ATTR: /* get current attributes */
|
||||
*(int*)data = scp->term.cur_attr;
|
||||
*(int*)data = (scp->term.cur_attr >> 8) & 0xFF;
|
||||
return 0;
|
||||
|
||||
case GIO_COLOR: /* is this a color console ? */
|
||||
|
Loading…
Reference in New Issue
Block a user