mirror of
https://repo.or.cz/socat.git
synced 2025-07-15 07:33:25 +00:00
issue error when PTY called with parameters
This commit is contained in:
parent
aae035c5b9
commit
b8d16ecd51
3 changed files with 39 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/* source: xio-pty.c */
|
||||
/* Copyright Gerhard Rieger 2002-2009 */
|
||||
/* Copyright Gerhard Rieger 2002-2011 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* this file contains the source for creating pty addresses */
|
||||
|
@ -47,6 +47,10 @@ static int xioopen_pty(int argc, const char *argv[], struct opt *opts, int xiofl
|
|||
compatibility we choose "no" as default */
|
||||
struct timespec pollintv = { PTY_INTERVALL };
|
||||
|
||||
if (argc != 1) {
|
||||
Error2("%s: wrong number of parameters (%d instead of 0)", argv[0], argc-1);
|
||||
}
|
||||
|
||||
xfd->stream.howtoend = END_CLOSE;
|
||||
|
||||
if (applyopts_single(&xfd->stream, opts, PH_INIT) < 0) return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue