--- a/src/ast_vgatool.h Thu Apr 28 20:32:02 2016
+++ b/src/ast_vgatool.h Thu Apr 28 20:34:40 2016
@@ -89,7 +89,7 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
val = io_reg.value; \
} while (0)
@@ -100,7 +100,7 @@
.offset1 = off+1, \
.value1 = val \
}; \
- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
} while (0)
#define GetIndexRegMask(off, index, and, val) do { \
@@ -109,7 +109,7 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
val = io_reg.value & and; \
} while (0)
@@ -120,13 +120,13 @@
.value = index, \
.offset1 = off+1 \
}; \
- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
__Temp = (io_reg.value & and) | val; \
io_reg.offset = off; \
io_reg.value = index; \
io_reg.offset1 = off+1; \
io_reg.value1 = __Temp; \
- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
} while (0)
#else /* !__sparc__ */
--- a/src/ast.h Thu Apr 28 20:35:08 2016
+++ b/src/ast.h Thu Apr 28 20:35:57 2016
@@ -375,9 +375,19 @@
#define VIS_SETIOREG (VIOC | 17)
#define VIS_GETIOREG (VIOC | 18)
+#ifdef __sparc
+#define ASTIOC ('Y' << 8)
+#define AST_GET_INDEX (ASTIOC | 14)
+#define AST_SET_INDEX (ASTIOC | 15)
+#endif
+
typedef struct vis_io_reg {
uchar_t offset;
uchar_t value;
+#ifdef __sparc
+ uchar_t offset1;
+ uchar_t value1;
+#endif
} vis_io_reg_t;
#endif