Displaying 20 results from an estimated 23 matches for "c_iflag".
2011 Apr 13
1
Fwd: Re: Asterisk as a Condo door opener/intercom
...ct termios port_config;
int fd;
int set_bits = 2;
/* Open monitor device. */
if ((fd = open(SWDEV, O_RDWR | O_NDELAY))< 0) {
fprintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerror(errno));
exit(1);}
cfmakeraw(&port_config );
port_config.c_iflag=port_config.c_iflag|IXON;
port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
tcsetattr( fd, TCSANOW,&port_config );
ioctl(fd, TIOCMSET,&set_bits );
/* wait for printer to warm up */
sleep(45);
/* not say "ready" and release the printer */...
2010 Mar 27
1
Syslinux-4/libutil: console_ansi_std()
Well, I decided to get ROSH back out and try to get it functioning in
Syslinux-4. As has been my habit, I first recompiled the Linux binary
and tried it out. In the beginning of ROSH, it calls
console_ansi_std(). When I was working on this in the past, using
this function ensured both the Linux and the Syslinux/COM32 binaries
function similarly.
When using fgets() to get an input string in the
2005 Feb 20
0
Re: Asterisk-Users Digest, Vol 7, Issue 260
...mios port_config;
int fd;
int set_bits = 6;
/* Open monitor device. */
if ((fd = open(SWDEV, O_RDWR | O_NDELAY)) < 0) {
fprintf(stderr, "lpswtich: %s: %s\n", SWDEV, sys_errlist[errno]);
exit(1);}
cfmakeraw( &port_config );
port_config.c_iflag=port_config.c_iflag|IXON;
port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
tcsetattr( fd, TCSANOW, &port_config );
ioctl(fd, TIOCMSET, &set_bits );
sleep(5);
close(fd);
}
/* lpswitch.h
* include file for lpswitchd configuration
* (c) 1994, David Cook &l...
2002 May 09
4
make distprep broken?
Hello All,
Doing a make distprep doesn't seem to work anymore:
$ make -f Makefile.in distprep
make: @SH@: Command not found
make: *** [catman-do] Error 127
I've seen this on AIX & Redhat (gnu make) and Solaris (native make). I
suspect this occurs on most platforms. Is this still the recommended way
of autoreconf'ing CVS releases for building?
-Daz.
2008 Jan 16
8
PATCH [xenconsoled]: makes pty slave raw early
Hi,
on my system (Linux 2.6.18.8 - ia64), if a domain write on the xencons
before xenconsole is initialized the domain gets back what it wrote.
This patch fixes this issue by making raw the pty slave very early.
(I suppose it doesn''t happen with linux as a guest because it takes a little
bit of time before writing to xencons).
Tristan.
_______________________________________________
2006 Jun 20
2
[PATCH] openssh pseudo-terminal bug
hello
short description:
ssh client sends a wrong all-zero terminal info when requesting forced pseudo-terminal
allocation while stdin is not a terminal.
sshd then sets the terminals ospeed to 0 because it receives this information from the
client. on solaris this means that the pseudo-terminal is closed and output of any
remote command is dropped.
longer description:
what we're doing is
2012 Dec 07
0
Rsync / ssh high cpu load
...0 55160 2028 ? Ss Dec06 0:00 scp
-f -- /yyy/zzz.sql
# strace -fF -v -p 29297
Process 29297 attached - interrupt to quit
--- SIGTTOU (Stopped (tty output)) @ 0 (0) ---
rt_sigreturn(0x16) = -1 EINTR (Interrupted system call)
ioctl(4, SNDCTL_TMR_CONTINUE or TCSETSF, {c_iflags=0x500,
c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0,
c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"})
= ? ERESTARTSYS (To be restarted)
--- SIGTTOU (Stopped (tty output)) @ 0 (0) ---
rt_sigreturn(0x16) = -1 EINTR (Interr...
2001 Nov 04
5
Wine and the serial port
I have an application that talks to hardware via the serial port.
(Actually, it talks to a lot of hardware, banking peripherals). The app
runs on both Win32 and OS/2.
Of course, the main theme is porting the thing natively to linux (and I'm
working on that). But just for fun I tried to get it to work with WINE, and
while the "device emulation" works perfectly (much to my
2002 Jun 21
0
[Bug 282] New: ttymodes sent can be invalid
...g message:
/* Set the new modes for the terminal. */
if (tcsetattr(fd, TCSANOW, &tio) == -1) {
log("Setting tty modes failed: %.100s", strerror(errno));
log("failed..: %d, %d, %d, %d, %d", fd,
tio.c_iflag, tio.c_oflag, tio.c_cflag, tio.c_lflag);
}
And notice that the system logged the following the next time through:
Setting tty modes failed: Invalid argument
failed..: 10, 1280, 5, 447, 51771
and tried again and only the fd changed:
Setting tty modes failed: Invalid argument...
2000 Jan 27
1
Long awaited round 1 of NeXT patches.
...struct termios *t;
+ speed_t speed;
+{
+
+ t->c_ispeed = t->c_ospeed = speed;
+}
+
+/*
+ * Make a pre-existing termios structure into "raw" mode: character-at-a-time
+ * mode with no characters interpreted, 8-bit data path.
+ */
+void
+cfmakeraw(t)
+ struct termios *t;
+{
+
+ t->c_iflag &=
+~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR);
+ t->c_iflag |= IGNBRK;
+ t->c_oflag &= ~OPOST;
+ t->c_lflag &=
+~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN);
+ t->c_cflag &= ~(CSIZE|PARENB);
+ t->c_cflag |= CS8|C...
2008 Nov 25
1
sio vs uart vs ucomm problems / differences
...) >= 0) {
t.c_ispeed = dev->speed;
t.c_ospeed = dev->speed;
t.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE |
ECHOK | ECHOKE | ECHONL | ECHOCTL | ECHOPRT | ALTWERASE | NOFLSH
| TOSTOP | FLUSHO | PENDIN | NOKERNINFO | EXTPROC);
t.c_iflag &= ~(ISTRIP | ICRNL | INLCR | IGNCR | IXON |
IXOFF | IXANY | IMAXBEL | IGNBRK | BRKINT | INPCK | IGNPAR | PARM
RK);
t.c_oflag &= ~(OPOST | ONLCR | OCRNL | OXTABS | ONOEOT |
ONOCR | ONLRET);
t.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CCTS_OFLOW |
CRTS_IFLOW | C...
2001 Oct 31
2
OpenStep (NeXT) and TTY modes
OpenStep, apparently, does not initialize new pty/tty modes to a sane
default.
I'm thinking this code snippet, added to tty_parse_modes() before the
for(;;) loop should suffice:
#ifdef HAVE_NEXT
tio.c_oflag |= ONLCR;
tio.c_lflag |= ECHO;
#endif /* HAVE_NEXT */
Also, I've noticed that "ssh -t next_host stty" gives different output
than an interactive session to the same
2002 Feb 12
1
SSH Client Hangs after logging in to SSHD
I'm not a ssh expert and I don't know if the log is good or bad, but I too am
running OpenSHH under OpenServer. I find that after I connect, the return key
has no effect unless I first type:
stty sane <Ctrl>j
If you've hit <ENTER> before that you must first press <Ctrl>j a couple of times
to clean out the buffer. After I type the above command, everything
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...ay or display)
+ */
+void rosh_console_raw(void)
+{
+ struct termios tio;
+
+ console_ansi_raw(); /* Allows get_key to get just 1 key sequence
+ (w/o delay or display */
+ /* Deal with the changes that haven't been replicated to ansiraw.c */
+ tcgetattr(0, &tio);
+ tio.c_iflag &= ~IGNCR;
+ tcsetattr(0, TCSAFLUSH, &tio);
+}
+
+/*
+ * Switches back to standard getline mode.
+ */
+void rosh_console_std(void)
+{
+ struct termios tio;
+
+ console_ansi_std();
+ tcgetattr(0, &tio);
+ tio.c_iflag |= ICRNL;
+ tio.c_iflag &= ~IGNCR;
+ tcsetattr...
2009 Feb 15
2
COM32 module: Read-Only shell
...aximum length is met/exceeded. */
+ if (cmdstr[curpos - 1] == ' ')
+ cmdstr[--curpos] = 0;
+ return curpos;
+} /* rosh_argcat */
+
+/*
+ * Prints a lot of the data in a struct termios
+ */
+/*
+void rosh_print_tc(struct termios *tio)
+{
+ printf(" -- termios: ");
+ printf(".c_iflag=%04X ", tio->c_iflag);
+ printf(".c_oflag=%04X ", tio->c_oflag);
+ printf(".c_cflag=%04X ", tio->c_cflag);
+ printf(".c_lflag=%04X ", tio->c_lflag);
+ printf(".c_cc[VTIME]='%d' ", tio->c_cc[VTIME]);
+ printf(".c_cc[VMIN]='...
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
...sprintf(str,"%s:%s",argv[1],strerror(errno));
fprintf(stderr,"%s\n",str);
exit(errno);
}
tcgetattr(fd,&oldtio); /* save current port settings */
bzero(&newtio, sizeof(newtio));
newtio.c_cflag = BAUDRATE /*| CRTSCTS*/ | CS8 | CLOCAL | CREAD;
newtio.c_iflag = IGNPAR | IGNBRK;
newtio.c_oflag = 0;
/* set input mode (non-canonical, no echo,...) */
newtio.c_lflag = 0;
newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
newtio.c_cc[VMIN] = 1; /* blocking read until 5 chars received */
tcflush(fd, TCIFLUSH);
tcsetattr(fd,TCS...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...truct file *filp)
/* Still being freed */
if (vc->port.tty) {
- release_console_sem();
+ console_unlock();
return -ERESTARTSYS;
}
tty->driver_data = vc;
@@ -2827,11 +2827,11 @@ static int con_open(struct tty_struct *tty, struct file *filp)
tty->termios->c_iflag |= IUTF8;
else
tty->termios->c_iflag &= ~IUTF8;
- release_console_sem();
+ console_unlock();
return ret;
}
}
- release_console_sem();
+ console_unlock();
return ret;
}
@@ -2844,9 +2844,9 @@ static void con_shutdown(struct tty_struct *tty)
{
struct vc_data *vc...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...truct file *filp)
/* Still being freed */
if (vc->port.tty) {
- release_console_sem();
+ console_unlock();
return -ERESTARTSYS;
}
tty->driver_data = vc;
@@ -2827,11 +2827,11 @@ static int con_open(struct tty_struct *tty, struct file *filp)
tty->termios->c_iflag |= IUTF8;
else
tty->termios->c_iflag &= ~IUTF8;
- release_console_sem();
+ console_unlock();
return ret;
}
}
- release_console_sem();
+ console_unlock();
return ret;
}
@@ -2844,9 +2844,9 @@ static void con_shutdown(struct tty_struct *tty)
{
struct vc_data *vc...
2011 Jan 20
1
[PATCH] change acquire/release_console_sem() to console_lock/unlock()
...truct file *filp)
/* Still being freed */
if (vc->port.tty) {
- release_console_sem();
+ console_unlock();
return -ERESTARTSYS;
}
tty->driver_data = vc;
@@ -2827,11 +2827,11 @@ static int con_open(struct tty_struct *tty, struct file *filp)
tty->termios->c_iflag |= IUTF8;
else
tty->termios->c_iflag &= ~IUTF8;
- release_console_sem();
+ console_unlock();
return ret;
}
}
- release_console_sem();
+ console_unlock();
return ret;
}
@@ -2844,9 +2844,9 @@ static void con_shutdown(struct tty_struct *tty)
{
struct vc_data *vc...
2013 Jan 30
3
bug report: apcsmart (WIN) 940-0024C connect fail, problem with command 'E'
Dear Ladies and Gentlemen,
I have several old, yet functioning APC Smart-UPS (Model 600LS, Part AP600I,
Firmware 6JI, no EEPROM, from 1991). They are not supported by Powerchute
any more. I run NUT 2.6.5-4 on Windows XP SP3. I use COM1 port with cable
940-0024C. The connection fails with APC Smart protocol driver 3.0
(2.6.3-3534:3540M), APC command table version 3.0 or higher - it works with
APC