xiaoxiang781216 commented on a change in pull request #5433:
URL: https://github.com/apache/incubator-nuttx/pull/5433#discussion_r801660439



##########
File path: drivers/serial/pty.c
##########
@@ -1139,50 +1139,46 @@ int pty_register(int minor)
       goto errout_with_pipea;
     }
 
-  /* Register the slave device
+  /* Register the master device
    *
-   * BSD style (deprecated): /dev/ttypN
-   * SUSv1 style:  /dev/pts/N
+   * BSD style (deprecated):  /dev/ptyN

Review comment:
       Done.

##########
File path: drivers/serial/pty.c
##########
@@ -1139,50 +1139,46 @@ int pty_register(int minor)
       goto errout_with_pipea;
     }
 
-  /* Register the slave device
+  /* Register the master device
    *
-   * BSD style (deprecated): /dev/ttypN
-   * SUSv1 style:  /dev/pts/N
+   * BSD style (deprecated):  /dev/ptyN
+   * SUSv1 style: Master: /dev/ptmx (multiplexor, see ptmx.c)
    *
    * Where N is the minor number
    */
 
-#ifdef CONFIG_PSEUDOTERM_BSD
-  snprintf(devname, 16, "/dev/ttyp%d", minor);
-#else
-  snprintf(devname, 16, "/dev/pts/%d", minor);
-#endif
+  snprintf(devname, 16, "/dev/pty%d", minor);
 
-  ret = register_driver(devname, &g_pty_fops, 0666, &devpair->pp_slave);
+  ret = register_driver(devname, &g_pty_fops, 0666, &devpair->pp_master);
   if (ret < 0)
     {
       goto errout_with_pipeb;
     }
 
-  /* Register the master device
+  /* Register the slave device
    *
-   * BSD style (deprecated):  /dev/ptyN
-   * SUSv1 style: Master: /dev/ptmx (multiplexor, see ptmx.c)
+   * BSD style (deprecated): /dev/ttypN
+   * SUSv1 style:  /dev/pts/N

Review comment:
       Done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to