Commit c2f30337 authored by Michael Holzheu's avatar Michael Holzheu Committed by Pavel Emelyanov

s390:criu: Add support for s390 consoles

On s390 we have special console drivers with minors 64 and 65.
Add support for them in criu code and in zdtm testsuite.
Reviewed-by: 's avatarAlice Frosi <alice@linux.vnet.ibm.com>
Signed-off-by: 's avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 27db1d9a
......@@ -295,6 +295,17 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
* of kernel).
*/
return &vt_driver;
#ifdef __s390x__
/*
* On s390 we have the following consoles:
* - tty3215 : ttyS0 , minor = 64, linemode console
* - sclp_line : ttyS0 , minor = 64, linemode console
* - sclp_vt220 : ttysclp0, minor = 65, vt220 console
* See also "drivers/s390/char"
*/
else if (minor == 64 || minor == 65)
return &vt_driver;
#endif
/* Other minors points to UART serial ports */
break;
case USB_SERIAL_MAJOR:
......
......@@ -15,6 +15,12 @@ const char *test_author = "Ruslan Kuprieiev <kupruser@gmail.com>";
char *filename;
TEST_OPTION(filename, string, "file name", 1);
#ifdef __s390x__
#define MINOR 64 /* ttyS0 */
#else
#define MINOR 5
#endif
int main(int argc, char **argv)
{
struct stat st1, st2;
......@@ -22,7 +28,7 @@ int main(int argc, char **argv)
test_init(argc, argv);
if (mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, makedev(4, 5))) {
if (mknod(filename, S_IFCHR | S_IRUSR | S_IWUSR, makedev(4, MINOR))) {
pr_perror("Can't create virtual terminal %s", filename);
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment