History log of /freebsd/sys/kern/tty_pts.c (Results 126 – 150 of 176)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 510ea843 28-Mar-2010 Ed Schouten <ed@FreeBSD.org>

Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.

A nice thing about POSIX 2008 is that it finally standardizes a way to
obtain file access/modification/change times in sub-second pre

Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.

A nice thing about POSIX 2008 is that it finally standardizes a way to
obtain file access/modification/change times in sub-second precision,
namely using struct timespec, which we already have for a very long
time. Unfortunately POSIX uses different names.

This commit adds compatibility macros, so existing code should still
build properly. Also change all source code in the kernel to work
without any of the compatibility macros. This makes it all a less
ambiguous.

I am also renaming st_birthtime to st_birthtim, even though it was a
local extension anyway. It seems Cygwin also has a st_birthtim.

show more ...


# d3e4b91f 13-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Remove the 1000 pseudo terminal limit from pts(4).

Even with the old utmp format, we could in fact go to pts/9999, because
ut_line wasn't guaranteed to be null terminated there.


# 9199c09a 06-Jan-2010 Warner Losh <imp@FreeBSD.org>

Merge from head at r201628.

# This hasn't been tested, and there are at least three bad commits
# that need to be backed out before the branch will be stable again.


# 328d9d2c 04-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Make TIOCSTI work again.

It looks like I didn't implement this when I imported MPSAFE TTY.
Applications like mail(1) still use this. I think it's conceptually bad.

Tested by: Pete French <petefrenc

Make TIOCSTI work again.

It looks like I didn't implement this when I imported MPSAFE TTY.
Applications like mail(1) still use this. I think it's conceptually bad.

Tested by: Pete French <petefrench ticketswitch com>
MFC after: 2 weeks

show more ...


# e6d84d05 18-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Make the wchan names of pts(4) fit in top(1).

Just like a similar change we made to the TTY code about half a year
ago, make these strings look similar.

Suggested by: Jille Timmermans <jille@quis.c

Make the wchan names of pts(4) fit in top(1).

Just like a similar change we made to the TTY code about half a year
ago, make these strings look similar.

Suggested by: Jille Timmermans <jille@quis.cx>

show more ...


Revision tags: release/8.0.0_cvs, release/8.0.0
# 1ee774f6 02-Oct-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC


# e76d823b 12-Sep-2009 Robert Watson <rwatson@FreeBSD.org>

Use C99 initialization for struct filterops.

Obtained from: Mac OS X
Sponsored by: Apple Inc.
MFC after: 3 weeks


# cbd59a4f 08-Sep-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC from head@196987


# 4d3b1aac 06-Sep-2009 Ed Schouten <ed@FreeBSD.org>

Move ptmx into pty(4).

Now that pty(4) is a loadable kernel module, I'd better move /dev/ptmx
in there as well. This means that pty(4) now provides almost all
pseudo-terminal compatibility code. Thi

Move ptmx into pty(4).

Now that pty(4) is a loadable kernel module, I'd better move /dev/ptmx
in there as well. This means that pty(4) now provides almost all
pseudo-terminal compatibility code. This means it's very easy to test
whether applications use the proper library interfaces when allocating
pseudo-terminals (namely posix_openpt and openpty).

show more ...


# bfdaa523 23-Aug-2009 Ed Schouten <ed@FreeBSD.org>

Allow pty(4) to be loaded as a kld.

Unfortunately, the wrappers that are present in pts(4) don't have the
mechanics to allow pty(4) to be unloaded safely, so I'm forcing this kld
to return EBUSY. Th

Allow pty(4) to be loaded as a kld.

Unfortunately, the wrappers that are present in pts(4) don't have the
mechanics to allow pty(4) to be unloaded safely, so I'm forcing this kld
to return EBUSY. This also means we have to enable some extra code in
pts(4) unconditionally.

Proposed by: rwatson

show more ...


# 5c67885a 23-Aug-2009 Ed Schouten <ed@FreeBSD.org>

Add ttydisc_rint_simple().

I noticed several drivers in our tree don't actually care about parity
and framing, such as pts(4), snp(4) (and my partially finished console
driver). Instead of duplicati

Add ttydisc_rint_simple().

I noticed several drivers in our tree don't actually care about parity
and framing, such as pts(4), snp(4) (and my partially finished console
driver). Instead of duplicating a lot of code, I think we'd better add a
utility function for those drivers to quickly process a buffer of input.

Also change pts(4) and snp(4) to use this function.

show more ...


# 11e9b8ba 04-Aug-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC @196061


# d40b91cb 02-Aug-2009 Ed Schouten <ed@FreeBSD.org>

Fix two bugs related to TTY input:

- fix write() on pseudo-terminal masters to return the amount of bytes
passed to the TTY, not the amount of bytes read from user.

- fix ttydisc_rint_bypass() to

Fix two bugs related to TTY input:

- fix write() on pseudo-terminal masters to return the amount of bytes
passed to the TTY, not the amount of bytes read from user.

- fix ttydisc_rint_bypass() to set the high watermark when it cannot
write all input, just like ttydisc_rint() itself.

Approved by: re (kib)

show more ...


# 6b53d5c0 08-Jul-2009 Ed Schouten <ed@FreeBSD.org>

Fix regressions in return events of poll() on TTYs.

As pointed out, POLLHUP should be generated, even if it hasn't been
specified on input. It is also not allowed to return both POLLOUT and
POLLHUP

Fix regressions in return events of poll() on TTYs.

As pointed out, POLLHUP should be generated, even if it hasn't been
specified on input. It is also not allowed to return both POLLOUT and
POLLHUP at the same time.

Reported by: jilles
Approved by: re (kib)

show more ...


# 7e857dd1 12-Jun-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- Merge from HEAD


# d8b0556c 10-Jun-2009 Konstantin Belousov <kib@FreeBSD.org>

Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive acces

Adapt vfs kqfilter to the shared vnode lock used by zfs write vop. Use
vnode interlock to protect the knote fields [1]. The locking assumes
that shared vnode lock is held, thus we get exclusive access to knote
either by exclusive vnode lock protection, or by shared vnode lock +
vnode interlock.

Do not use kl_locked() method to assert either lock ownership or the
fact that curthread does not own the lock. For shared locks, ownership
is not recorded, e.g. VOP_ISLOCKED can return LK_SHARED for the shared
lock not owned by curthread, causing false positives in kqueue subsystem
assertions about knlist lock.

Remove kl_locked method from knlist lock vector, and add two separate
assertion methods kl_assert_locked and kl_assert_unlocked, that are
supposed to use proper asserts. Change knlist_init accordingly.

Add convenience function knlist_init_mtx to reduce number of arguments
for typical knlist initialization.

Submitted by: jhb [1]
Noted by: jhb [2]
Reviewed by: jhb
Tested by: rnoland

show more ...


# c5e30cc0 29-May-2009 Ed Schouten <ed@FreeBSD.org>

Last minute TTY API change: remove mutex argument from tty_alloc().

I don't want people to override the mutex when allocating a TTY. It has
to be there, to keep drivers like syscons happy. So I'm cr

Last minute TTY API change: remove mutex argument from tty_alloc().

I don't want people to override the mutex when allocating a TTY. It has
to be there, to keep drivers like syscons happy. So I'm creating a
tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex()
should eventually be removed.

The advantage of this approach, is that we can just remove a function,
without breaking the regular API in the future.

show more ...


# e7153b25 07-May-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Merge from HEAD


Revision tags: release/7.2.0_cvs, release/7.2.0
# ccfd3aab 25-Apr-2009 Ed Schouten <ed@FreeBSD.org>

Turn MAXPTSDEVS into a sysctl tunable.

This allows users to increase the maximum amount of pseudo-terminals
without changing any source code. Users must increase UT_LINESIZE before
attempting to inc

Turn MAXPTSDEVS into a sysctl tunable.

This allows users to increase the maximum amount of pseudo-terminals
without changing any source code. Users must increase UT_LINESIZE before
attempting to increase kern.pts_maxdev.

show more ...


# 1829d5da 12-Mar-2009 Warner Losh <imp@FreeBSD.org>

Update the projects tree to a newer FreeBSD current.


# c4d4bcda 01-Mar-2009 Ed Schouten <ed@FreeBSD.org>

Improve my previous changes to the TTY code: also remove memcpy().

It's better to just use internal language constructs, because it is
likely the compiler has a better opinion on whether to perform

Improve my previous changes to the TTY code: also remove memcpy().

It's better to just use internal language constructs, because it is
likely the compiler has a better opinion on whether to perform inlining,
which is very likely to happen to struct winsize.

Submitted by: Christoph Mallon <christoph mallon gmx de>

show more ...


# 4b2d6aaf 28-Feb-2009 Ed Schouten <ed@FreeBSD.org>

Replace bcopy() calls inside the TTY layer with memcpy()/strlcpy().

In all these cases the buffers never overlap. Program names are also
likely to be shorter, so use a regular strlcpy() to copy p_co

Replace bcopy() calls inside the TTY layer with memcpy()/strlcpy().

In all these cases the buffers never overlap. Program names are also
likely to be shorter, so use a regular strlcpy() to copy p_comm.

show more ...


# 40d05103 19-Feb-2009 Ed Schouten <ed@FreeBSD.org>

Squash some small bugs in pts(4).

- Don't return a negative errno when using an unknown ioctl() on a
pseudo-terminal master device. Be sure to convert ENOIOCTL to ENOTTY,
just like the TTY layer

Squash some small bugs in pts(4).

- Don't return a negative errno when using an unknown ioctl() on a
pseudo-terminal master device. Be sure to convert ENOIOCTL to ENOTTY,
just like the TTY layer does.

- Even though we should return st_rdev of the master device node when
emulating pty(4) devices, FIODGNAME should still return the name of
the slave device. Otherwise ptsname(3) and ttyname(3) return an
invalid device name.

show more ...


Revision tags: release/7.1.0_cvs, release/7.1.0
# 67dd0ccb 21-Dec-2008 Ed Schouten <ed@FreeBSD.org>

Set PTS_FINISHED before waking up any threads.

Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any
kevent(2) users. Because the kqueue handlers are executed synchronously,
we must s

Set PTS_FINISHED before waking up any threads.

Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any
kevent(2) users. Because the kqueue handlers are executed synchronously,
we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup().

Discovered by: nork

show more ...


# 41fe50f5 20-Dec-2008 Sam Leffler <sam@FreeBSD.org>

MFH @ 186335


12345678