mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
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: Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
27db1d9a04
commit
c2f30337a5
11
criu/tty.c
11
criu/tty.c
@@ -295,6 +295,17 @@ struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev)
|
|||||||
* of kernel).
|
* of kernel).
|
||||||
*/
|
*/
|
||||||
return &vt_driver;
|
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 */
|
/* Other minors points to UART serial ports */
|
||||||
break;
|
break;
|
||||||
case USB_SERIAL_MAJOR:
|
case USB_SERIAL_MAJOR:
|
||||||
|
@@ -15,6 +15,12 @@ const char *test_author = "Ruslan Kuprieiev <kupruser@gmail.com>";
|
|||||||
char *filename;
|
char *filename;
|
||||||
TEST_OPTION(filename, string, "file name", 1);
|
TEST_OPTION(filename, string, "file name", 1);
|
||||||
|
|
||||||
|
#ifdef __s390x__
|
||||||
|
#define MINOR 64 /* ttyS0 */
|
||||||
|
#else
|
||||||
|
#define MINOR 5
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct stat st1, st2;
|
struct stat st1, st2;
|
||||||
@@ -22,7 +28,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
test_init(argc, 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);
|
pr_perror("Can't create virtual terminal %s", filename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user