License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef _LINUX_TTY_DRIVER_H
|
|
|
|
#define _LINUX_TTY_DRIVER_H
|
|
|
|
|
2021-11-26 16:15:52 +08:00
|
|
|
#include <linux/export.h>
|
|
|
|
#include <linux/fs.h>
|
|
|
|
#include <linux/kref.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/cdev.h>
|
2022-08-10 07:41:40 +08:00
|
|
|
#include <linux/uaccess.h>
|
2021-11-26 16:15:52 +08:00
|
|
|
#include <linux/termios.h>
|
|
|
|
#include <linux/seq_file.h>
|
|
|
|
|
|
|
|
struct tty_struct;
|
|
|
|
struct tty_driver;
|
|
|
|
struct serial_icounter_struct;
|
|
|
|
struct serial_struct;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct tty_operations -- interface between driver and tty
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @lookup: ``struct tty_struct *()(struct tty_driver *self, struct file *,
|
|
|
|
* int idx)``
|
2008-10-13 17:42:00 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Return the tty device corresponding to @idx, %NULL if there is not
|
|
|
|
* one currently in use and an %ERR_PTR value on error. Called under
|
|
|
|
* %tty_mutex (for now!)
|
2008-10-13 17:42:00 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional method. Default behaviour is to use the @self->ttys array.
|
2008-10-13 17:42:00 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @install: ``int ()(struct tty_driver *self, struct tty_struct *tty)``
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Install a new @tty into the @self's internal tables. Used in
|
|
|
|
* conjunction with @lookup and @remove methods.
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional method. Default behaviour is to use the @self->ttys array.
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @remove: ``void ()(struct tty_driver *self, struct tty_struct *tty)``
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Remove a closed @tty from the @self's internal tables. Used in
|
|
|
|
* conjunction with @lookup and @remove methods.
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional method. Default behaviour is to use the @self->ttys array.
|
2008-10-13 17:42:19 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @open: ``int ()(struct tty_struct *tty, struct file *)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called when a particular @tty device is opened. This
|
|
|
|
* routine is mandatory; if this routine is not filled in, the attempted
|
|
|
|
* open will fail with %ENODEV.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* Required method. Called with tty lock held. May sleep.
|
2014-06-16 21:16:58 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @close: ``void ()(struct tty_struct *tty, struct file *)``
|
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* This routine is called when a particular @tty device is closed. At the
|
|
|
|
* point of return from this call the driver must make no further ldisc
|
|
|
|
* calls of any kind.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Remark: called even if the corresponding @open() failed.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* Required method. Called with tty lock held. May sleep.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @shutdown: ``void ()(struct tty_struct *tty)``
|
2008-10-13 17:41:30 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called under the tty lock when a particular @tty device
|
|
|
|
* is closed for the last time. It executes before the @tty resources
|
|
|
|
* are freed so may execute while another function holds a @tty kref.
|
2009-09-28 00:00:42 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @cleanup: ``void ()(struct tty_struct *tty)``
|
2009-09-28 00:00:42 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called asynchronously when a particular @tty device
|
2009-09-28 00:00:42 +08:00
|
|
|
* is closed for the last time freeing up the resources. This is
|
|
|
|
* actually the second part of shutdown for routines that might sleep.
|
|
|
|
*
|
2023-08-10 17:15:03 +08:00
|
|
|
* @write: ``ssize_t ()(struct tty_struct *tty, const unsigned char *buf,
|
|
|
|
* size_t count)``
|
2008-10-13 17:41:30 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called by the kernel to write a series (@count) of
|
|
|
|
* characters (@buf) to the @tty device. The characters may come from
|
|
|
|
* user space or kernel space. This routine will return the
|
2008-06-23 19:06:52 +08:00
|
|
|
* number of characters actually accepted for writing.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* May occur in parallel in special cases. Because this includes panic
|
|
|
|
* paths drivers generally shouldn't try and do clever locking here.
|
|
|
|
*
|
|
|
|
* Optional: Required for writable devices. May not sleep.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @put_char: ``int ()(struct tty_struct *tty, unsigned char ch)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called by the kernel to write a single character @ch to
|
|
|
|
* the @tty device. If the kernel uses this routine, it must call the
|
|
|
|
* @flush_chars() routine (if defined) when it is done stuffing characters
|
|
|
|
* into the driver. If there is no room in the queue, the character is
|
|
|
|
* ignored.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: Kernel will use the @write method if not provided. Do not
|
|
|
|
* call this function directly, call tty_put_char().
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @flush_chars: ``void ()(struct tty_struct *tty)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is called by the kernel after it has written a
|
|
|
|
* series of characters to the tty device using @put_char().
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional. Do not call this function directly, call
|
|
|
|
* tty_driver_flush_chars().
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @write_room: ``unsigned int ()(struct tty_struct *tty)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine returns the numbers of characters the @tty driver
|
|
|
|
* will accept for queuing to be written. This number is subject
|
|
|
|
* to change as output buffers get emptied, or if the output flow
|
2005-04-17 06:20:36 +08:00
|
|
|
* control is acted.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* The ldisc is responsible for being intelligent about multi-threading of
|
|
|
|
* write_room/write calls
|
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Required if @write method is provided else not needed. Do not call this
|
|
|
|
* function directly, call tty_write_room()
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @chars_in_buffer: ``unsigned int ()(struct tty_struct *tty)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine returns the number of characters in the device private
|
|
|
|
* output queue. Used in tty_wait_until_sent() and for poll()
|
|
|
|
* implementation.
|
2007-05-11 13:22:50 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: if not provided, it is assumed there is no queue on the
|
|
|
|
* device. Do not call this function directly, call tty_chars_in_buffer().
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @ioctl: ``int ()(struct tty_struct *tty, unsigned int cmd,
|
|
|
|
* unsigned long arg)``
|
2007-05-11 13:22:50 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine allows the @tty driver to implement device-specific
|
|
|
|
* ioctls. If the ioctl number passed in @cmd is not recognized by the
|
|
|
|
* driver, it should return %ENOIOCTLCMD.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @compat_ioctl: ``long ()(struct tty_struct *tty, unsigned int cmd,
|
|
|
|
* unsigned long arg)``
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Implement ioctl processing for 32 bit process on 64 bit system.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2022-08-16 19:57:39 +08:00
|
|
|
* @set_termios: ``void ()(struct tty_struct *tty, const struct ktermios *old)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine allows the @tty driver to be notified when device's
|
2021-11-26 16:15:55 +08:00
|
|
|
* termios settings have changed. New settings are in @tty->termios.
|
|
|
|
* Previous settings are passed in the @old argument.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* The API is defined such that the driver should return the actual modes
|
|
|
|
* selected. This means that the driver is responsible for modifying any
|
|
|
|
* bits in @tty->termios it cannot fulfill to indicate the actual modes
|
|
|
|
* being used.
|
|
|
|
*
|
|
|
|
* Optional. Called under the @tty->termios_rwsem. May sleep.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @set_ldisc: ``void ()(struct tty_struct *tty)``
|
2008-04-30 15:54:18 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine allows the @tty driver to be notified when the device's
|
2021-11-26 16:15:55 +08:00
|
|
|
* line discipline is being changed. At the point this is done the
|
|
|
|
* discipline is not yet usable.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional. Called under the @tty->ldisc_sem and @tty->termios_rwsem.
|
2008-04-30 15:54:18 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @throttle: ``void ()(struct tty_struct *tty)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine notifies the @tty driver that input buffers for the line
|
|
|
|
* discipline are close to full, and it should somehow signal that no more
|
|
|
|
* characters should be sent to the @tty.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* Serialization including with @unthrottle() is the job of the ldisc
|
|
|
|
* layer.
|
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: Always invoke via tty_throttle_safe(). Called under the
|
|
|
|
* @tty->termios_rwsem.
|
2014-09-11 03:06:31 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @unthrottle: ``void ()(struct tty_struct *tty)``
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine notifies the @tty driver that it should signal that
|
|
|
|
* characters can now be sent to the @tty without fear of overrunning the
|
|
|
|
* input buffers of the line disciplines.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional. Always invoke via tty_unthrottle(). Called under the
|
|
|
|
* @tty->termios_rwsem.
|
|
|
|
*
|
|
|
|
* @stop: ``void ()(struct tty_struct *tty)``
|
|
|
|
*
|
|
|
|
* This routine notifies the @tty driver that it should stop outputting
|
2005-04-17 06:20:36 +08:00
|
|
|
* characters to the tty device.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Called with @tty->flow.lock held. Serialized with @start() method.
|
|
|
|
*
|
|
|
|
* Optional. Always invoke via stop_tty().
|
|
|
|
*
|
|
|
|
* @start: ``void ()(struct tty_struct *tty)``
|
|
|
|
*
|
|
|
|
* This routine notifies the @tty driver that it resumed sending
|
|
|
|
* characters to the @tty device.
|
|
|
|
*
|
|
|
|
* Called with @tty->flow.lock held. Serialized with stop() method.
|
|
|
|
*
|
|
|
|
* Optional. Always invoke via start_tty().
|
|
|
|
*
|
|
|
|
* @hangup: ``void ()(struct tty_struct *tty)``
|
|
|
|
*
|
|
|
|
* This routine notifies the @tty driver that it should hang up the @tty
|
|
|
|
* device.
|
2014-09-11 03:06:31 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional. Called with tty lock held.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @break_ctl: ``int ()(struct tty_struct *tty, int state)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This optional routine requests the @tty driver to turn on or off BREAK
|
|
|
|
* status on the RS-232 port. If @state is -1, then the BREAK status
|
|
|
|
* should be turned on; if @state is 0, then BREAK should be turned off.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* If this routine is implemented, the high-level tty driver will handle
|
|
|
|
* the following ioctls: %TCSBRK, %TCSBRKP, %TIOCSBRK, %TIOCCBRK.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* If the driver sets %TTY_DRIVER_HARDWARE_BREAK in tty_alloc_driver(),
|
|
|
|
* then the interface will also be called with actual times and the
|
|
|
|
* hardware is expected to do the delay work itself. 0 and -1 are still
|
|
|
|
* used for on/off.
|
2014-06-16 21:16:58 +08:00
|
|
|
*
|
2021-11-26 16:15:55 +08:00
|
|
|
* Optional: Required for %TCSBRK/%BRKP/etc. handling. May sleep.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @flush_buffer: ``void ()(struct tty_struct *tty)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine discards device private output buffer. Invoked on close,
|
|
|
|
* hangup, to implement %TCOFLUSH ioctl and similar.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: if not provided, it is assumed there is no queue on the
|
|
|
|
* device. Do not call this function directly, call
|
|
|
|
* tty_driver_flush_buffer().
|
2008-07-22 18:18:03 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @wait_until_sent: ``void ()(struct tty_struct *tty, int timeout)``
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine waits until the device has written out all of the
|
|
|
|
* characters in its transmitter FIFO. Or until @timeout (in jiffies) is
|
|
|
|
* reached.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: If not provided, the device is assumed to have no FIFO.
|
2021-11-26 16:15:55 +08:00
|
|
|
* Usually correct to invoke via tty_wait_until_sent(). May sleep.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @send_xchar: ``void ()(struct tty_struct *tty, char ch)``
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is used to send a high-priority XON/XOFF character (@ch)
|
|
|
|
* to the @tty device.
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: If not provided, then the @write method is called under
|
|
|
|
* the @tty->atomic_write_lock to keep it serialized with the ldisc.
|
2008-04-30 15:54:13 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @tiocmget: ``int ()(struct tty_struct *tty)``
|
2008-08-15 17:39:38 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* This routine is used to obtain the modem status bits from the @tty
|
|
|
|
* driver.
|
2008-08-15 17:39:38 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Optional: If not provided, then %ENOTTY is returned from the %TIOCMGET
|
|
|
|
* ioctl. Do not call this function directly, call tty_tiocmget().
|
|
|
|
*
|
|
|
|
* @tiocmset: ``int ()(struct tty_struct *tty,
|
|
|
|
* unsigned int set, unsigned int clear)``
|
|
|
|
*
|
|
|
|
* This routine is used to set the modem status bits to the @tty driver.
|
|
|
|
* First, @clear bits should be cleared, then @set bits set.
|
|
|
|
*
|
|
|
|
* Optional: If not provided, then %ENOTTY is returned from the %TIOCMSET
|
|
|
|
* ioctl. Do not call this function directly, call tty_tiocmset().
|
|
|
|
*
|
|
|
|
* @resize: ``int ()(struct tty_struct *tty, struct winsize *ws)``
|
|
|
|
*
|
|
|
|
* Called when a termios request is issued which changes the requested
|
|
|
|
* terminal geometry to @ws.
|
2008-08-15 17:39:38 +08:00
|
|
|
*
|
|
|
|
* Optional: the default action is to update the termios structure
|
|
|
|
* without error. This is usually the correct behaviour. Drivers should
|
2021-11-26 16:15:52 +08:00
|
|
|
* not force errors here if they are not resizable objects (e.g. a serial
|
2008-08-15 17:39:38 +08:00
|
|
|
* line). See tty_do_resize() if you need to wrap the standard method
|
2021-11-26 16:15:52 +08:00
|
|
|
* in your own logic -- the usual case.
|
|
|
|
*
|
|
|
|
* @get_icount: ``int ()(struct tty_struct *tty,
|
|
|
|
* struct serial_icounter *icount)``
|
|
|
|
*
|
|
|
|
* Called when the @tty device receives a %TIOCGICOUNT ioctl. Passed a
|
|
|
|
* kernel structure @icount to complete.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise %ENOTTY will be returned.
|
2008-10-13 17:38:18 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* @get_serial: ``int ()(struct tty_struct *tty, struct serial_struct *p)``
|
2010-09-17 01:21:24 +08:00
|
|
|
*
|
2021-11-26 16:15:52 +08:00
|
|
|
* Called when the @tty device receives a %TIOCGSERIAL ioctl. Passed a
|
|
|
|
* kernel structure @p (&struct serial_struct) to complete.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise %ENOTTY will be returned.
|
|
|
|
* Do not call this function directly, call tty_tiocgserial().
|
|
|
|
*
|
|
|
|
* @set_serial: ``int ()(struct tty_struct *tty, struct serial_struct *p)``
|
|
|
|
*
|
|
|
|
* Called when the @tty device receives a %TIOCSSERIAL ioctl. Passed a
|
|
|
|
* kernel structure @p (&struct serial_struct) to set the values from.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise %ENOTTY will be returned.
|
|
|
|
* Do not call this function directly, call tty_tiocsserial().
|
|
|
|
*
|
|
|
|
* @show_fdinfo: ``void ()(struct tty_struct *tty, struct seq_file *m)``
|
|
|
|
*
|
|
|
|
* Called when the @tty device file descriptor receives a fdinfo request
|
|
|
|
* from VFS (to show in /proc/<pid>/fdinfo/). @m should be filled with
|
|
|
|
* information.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise nothing is written to @m.
|
|
|
|
* Do not call this function directly, call tty_show_fdinfo().
|
|
|
|
*
|
|
|
|
* @poll_init: ``int ()(struct tty_driver *driver, int line, char *options)``
|
|
|
|
*
|
|
|
|
* kgdboc support (Documentation/dev-tools/kgdb.rst). This routine is
|
|
|
|
* called to initialize the HW for later use by calling @poll_get_char or
|
|
|
|
* @poll_put_char.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise skipped as a non-polling
|
|
|
|
* driver.
|
|
|
|
*
|
|
|
|
* @poll_get_char: ``int ()(struct tty_driver *driver, int line)``
|
|
|
|
*
|
|
|
|
* kgdboc support (see @poll_init). @driver should read a character from a
|
|
|
|
* tty identified by @line and return it.
|
|
|
|
*
|
|
|
|
* Optional: called only if @poll_init provided.
|
|
|
|
*
|
|
|
|
* @poll_put_char: ``void ()(struct tty_driver *driver, int line, char ch)``
|
|
|
|
*
|
|
|
|
* kgdboc support (see @poll_init). @driver should write character @ch to
|
|
|
|
* a tty identified by @line.
|
|
|
|
*
|
|
|
|
* Optional: called only if @poll_init provided.
|
|
|
|
*
|
|
|
|
* @proc_show: ``int ()(struct seq_file *m, void *driver)``
|
|
|
|
*
|
|
|
|
* Driver @driver (cast to &struct tty_driver) can show additional info in
|
|
|
|
* /proc/tty/driver/<driver_name>. It is enough to fill in the information
|
|
|
|
* into @m.
|
|
|
|
*
|
|
|
|
* Optional: called only if provided, otherwise no /proc entry created.
|
|
|
|
*
|
|
|
|
* This structure defines the interface between the low-level tty driver and
|
|
|
|
* the tty routines. These routines can be defined. Unless noted otherwise,
|
|
|
|
* they are optional, and can be filled in with a %NULL pointer.
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
struct tty_operations {
|
2008-10-13 17:42:59 +08:00
|
|
|
struct tty_struct * (*lookup)(struct tty_driver *driver,
|
2016-04-26 11:04:08 +08:00
|
|
|
struct file *filp, int idx);
|
2008-10-13 17:42:19 +08:00
|
|
|
int (*install)(struct tty_driver *driver, struct tty_struct *tty);
|
|
|
|
void (*remove)(struct tty_driver *driver, struct tty_struct *tty);
|
2005-04-17 06:20:36 +08:00
|
|
|
int (*open)(struct tty_struct * tty, struct file * filp);
|
|
|
|
void (*close)(struct tty_struct * tty, struct file * filp);
|
2008-10-13 17:41:30 +08:00
|
|
|
void (*shutdown)(struct tty_struct *tty);
|
2009-09-28 00:00:42 +08:00
|
|
|
void (*cleanup)(struct tty_struct *tty);
|
2023-08-10 17:15:03 +08:00
|
|
|
ssize_t (*write)(struct tty_struct *tty, const u8 *buf, size_t count);
|
2023-08-10 17:15:02 +08:00
|
|
|
int (*put_char)(struct tty_struct *tty, u8 ch);
|
2005-04-17 06:20:36 +08:00
|
|
|
void (*flush_chars)(struct tty_struct *tty);
|
2021-05-05 17:19:15 +08:00
|
|
|
unsigned int (*write_room)(struct tty_struct *tty);
|
2021-05-05 17:19:19 +08:00
|
|
|
unsigned int (*chars_in_buffer)(struct tty_struct *tty);
|
2011-02-15 00:27:22 +08:00
|
|
|
int (*ioctl)(struct tty_struct *tty,
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int cmd, unsigned long arg);
|
2011-02-15 00:27:22 +08:00
|
|
|
long (*compat_ioctl)(struct tty_struct *tty,
|
2007-05-11 13:22:50 +08:00
|
|
|
unsigned int cmd, unsigned long arg);
|
2022-08-16 19:57:39 +08:00
|
|
|
void (*set_termios)(struct tty_struct *tty, const struct ktermios *old);
|
2005-04-17 06:20:36 +08:00
|
|
|
void (*throttle)(struct tty_struct * tty);
|
|
|
|
void (*unthrottle)(struct tty_struct * tty);
|
|
|
|
void (*stop)(struct tty_struct *tty);
|
|
|
|
void (*start)(struct tty_struct *tty);
|
|
|
|
void (*hangup)(struct tty_struct *tty);
|
2008-07-22 18:18:03 +08:00
|
|
|
int (*break_ctl)(struct tty_struct *tty, int state);
|
2005-04-17 06:20:36 +08:00
|
|
|
void (*flush_buffer)(struct tty_struct *tty);
|
|
|
|
void (*set_ldisc)(struct tty_struct *tty);
|
|
|
|
void (*wait_until_sent)(struct tty_struct *tty, int timeout);
|
|
|
|
void (*send_xchar)(struct tty_struct *tty, char ch);
|
2011-02-15 00:26:14 +08:00
|
|
|
int (*tiocmget)(struct tty_struct *tty);
|
2011-02-15 00:26:50 +08:00
|
|
|
int (*tiocmset)(struct tty_struct *tty,
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned int set, unsigned int clear);
|
2009-01-02 21:43:17 +08:00
|
|
|
int (*resize)(struct tty_struct *tty, struct winsize *ws);
|
2010-09-17 01:21:24 +08:00
|
|
|
int (*get_icount)(struct tty_struct *tty,
|
|
|
|
struct serial_icounter_struct *icount);
|
2018-09-12 09:53:32 +08:00
|
|
|
int (*get_serial)(struct tty_struct *tty, struct serial_struct *p);
|
|
|
|
int (*set_serial)(struct tty_struct *tty, struct serial_struct *p);
|
2017-07-18 05:27:59 +08:00
|
|
|
void (*show_fdinfo)(struct tty_struct *tty, struct seq_file *m);
|
2008-04-18 02:05:37 +08:00
|
|
|
#ifdef CONFIG_CONSOLE_POLL
|
|
|
|
int (*poll_init)(struct tty_driver *driver, int line, char *options);
|
|
|
|
int (*poll_get_char)(struct tty_driver *driver, int line);
|
|
|
|
void (*poll_put_char)(struct tty_driver *driver, int line, char ch);
|
|
|
|
#endif
|
2021-11-26 16:15:52 +08:00
|
|
|
int (*proc_show)(struct seq_file *m, void *driver);
|
2016-10-28 16:22:25 +08:00
|
|
|
} __randomize_layout;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2021-11-26 16:15:51 +08:00
|
|
|
/**
|
|
|
|
* struct tty_driver -- driver for TTY devices
|
|
|
|
*
|
|
|
|
* @kref: reference counting. Reaching zero frees all the internals and the
|
|
|
|
* driver.
|
|
|
|
* @cdevs: allocated/registered character /dev devices
|
|
|
|
* @owner: modules owning this driver. Used drivers cannot be rmmod'ed.
|
|
|
|
* Automatically set by tty_alloc_driver().
|
|
|
|
* @driver_name: name of the driver used in /proc/tty
|
|
|
|
* @name: used for constructing /dev node name
|
|
|
|
* @name_base: used as a number base for constructing /dev node name
|
|
|
|
* @major: major /dev device number (zero for autoassignment)
|
|
|
|
* @minor_start: the first minor /dev device number
|
|
|
|
* @num: number of devices allocated
|
|
|
|
* @type: type of tty driver (%TTY_DRIVER_TYPE_)
|
|
|
|
* @subtype: subtype of tty driver (%SYSTEM_TYPE_, %PTY_TYPE_, %SERIAL_TYPE_)
|
|
|
|
* @init_termios: termios to set to each tty initially (e.g. %tty_std_termios)
|
|
|
|
* @flags: tty driver flags (%TTY_DRIVER_)
|
|
|
|
* @proc_entry: proc fs entry, used internally
|
|
|
|
* @other: driver of the linked tty; only used for the PTY driver
|
|
|
|
* @ttys: array of active &struct tty_struct, set by tty_standard_install()
|
|
|
|
* @ports: array of &struct tty_port; can be set during initialization by
|
|
|
|
* tty_port_link_device() and similar
|
|
|
|
* @termios: storage for termios at each TTY close for the next open
|
|
|
|
* @driver_state: pointer to driver's arbitrary data
|
|
|
|
* @ops: driver hooks for TTYs. Set them using tty_set_operations(). Use &struct
|
|
|
|
* tty_port helpers in them as much as possible.
|
|
|
|
* @tty_drivers: used internally to link tty_drivers together
|
|
|
|
*
|
|
|
|
* The usual handling of &struct tty_driver is to allocate it by
|
|
|
|
* tty_alloc_driver(), set up all the necessary members, and register it by
|
|
|
|
* tty_register_driver(). At last, the driver is torn down by calling
|
|
|
|
* tty_unregister_driver() followed by tty_driver_kref_put().
|
|
|
|
*
|
|
|
|
* The fields required to be set before calling tty_register_driver() include
|
|
|
|
* @driver_name, @name, @type, @subtype, @init_termios, and @ops.
|
|
|
|
*/
|
2005-04-17 06:20:36 +08:00
|
|
|
struct tty_driver {
|
2021-11-26 16:15:51 +08:00
|
|
|
struct kref kref;
|
2015-05-19 23:06:53 +08:00
|
|
|
struct cdev **cdevs;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct module *owner;
|
|
|
|
const char *driver_name;
|
|
|
|
const char *name;
|
2021-11-26 16:15:51 +08:00
|
|
|
int name_base;
|
|
|
|
int major;
|
|
|
|
int minor_start;
|
|
|
|
unsigned int num;
|
|
|
|
short type;
|
|
|
|
short subtype;
|
|
|
|
struct ktermios init_termios;
|
|
|
|
unsigned long flags;
|
|
|
|
struct proc_dir_entry *proc_entry;
|
|
|
|
struct tty_driver *other;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Pointer to the tty data structures
|
|
|
|
*/
|
|
|
|
struct tty_struct **ttys;
|
2012-06-04 19:35:36 +08:00
|
|
|
struct tty_port **ports;
|
2006-12-08 18:38:44 +08:00
|
|
|
struct ktermios **termios;
|
2008-04-30 15:54:13 +08:00
|
|
|
void *driver_state;
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2008-04-30 15:54:13 +08:00
|
|
|
* Driver methods
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
|
2008-04-30 15:54:13 +08:00
|
|
|
const struct tty_operations *ops;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct list_head tty_drivers;
|
2016-10-28 16:22:25 +08:00
|
|
|
} __randomize_layout;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
extern struct list_head tty_drivers;
|
|
|
|
|
2021-09-14 17:11:21 +08:00
|
|
|
struct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner,
|
|
|
|
unsigned long flags);
|
|
|
|
struct tty_driver *tty_find_polling_driver(char *name, int *line);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2021-09-14 17:11:21 +08:00
|
|
|
void tty_driver_kref_put(struct tty_driver *driver);
|
2009-04-07 23:48:07 +08:00
|
|
|
|
2012-08-08 03:47:42 +08:00
|
|
|
/* Use TTY_DRIVER_* flags below */
|
|
|
|
#define tty_alloc_driver(lines, flags) \
|
|
|
|
__tty_alloc_driver(lines, THIS_MODULE, flags)
|
|
|
|
|
2009-04-07 23:48:07 +08:00
|
|
|
static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
|
2008-10-13 17:42:09 +08:00
|
|
|
{
|
|
|
|
kref_get(&d->kref);
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
2021-07-23 15:43:15 +08:00
|
|
|
static inline void tty_set_operations(struct tty_driver *driver,
|
|
|
|
const struct tty_operations *op)
|
|
|
|
{
|
|
|
|
driver->ops = op;
|
|
|
|
}
|
|
|
|
|
2021-11-26 16:15:58 +08:00
|
|
|
/**
|
|
|
|
* DOC: TTY Driver Flags
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_RESET_TERMIOS
|
|
|
|
* Requests the tty layer to reset the termios setting when the last
|
|
|
|
* process has closed the device. Used for PTYs, in particular.
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_REAL_RAW
|
|
|
|
* Indicates that the driver will guarantee not to set any special
|
|
|
|
* character handling flags if this is set for the tty:
|
|
|
|
*
|
|
|
|
* ``(IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || !INPCK)``
|
|
|
|
*
|
|
|
|
* That is, if there is no reason for the driver to
|
|
|
|
* send notifications of parity and break characters up to the line
|
|
|
|
* driver, it won't do so. This allows the line driver to optimize for
|
|
|
|
* this case if this flag is set. (Note that there is also a promise, if
|
|
|
|
* the above case is true, not to signal overruns, either.)
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_DYNAMIC_DEV
|
|
|
|
* The individual tty devices need to be registered with a call to
|
|
|
|
* tty_register_device() when the device is found in the system and
|
|
|
|
* unregistered with a call to tty_unregister_device() so the devices will
|
|
|
|
* be show up properly in sysfs. If not set, all &tty_driver.num entries
|
|
|
|
* will be created by the tty core in sysfs when tty_register_driver() is
|
|
|
|
* called. This is to be used by drivers that have tty devices that can
|
|
|
|
* appear and disappear while the main tty driver is registered with the
|
|
|
|
* tty core.
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_DEVPTS_MEM
|
|
|
|
* Don't use the standard arrays (&tty_driver.ttys and
|
|
|
|
* &tty_driver.termios), instead use dynamic memory keyed through the
|
|
|
|
* devpts filesystem. This is only applicable to the PTY driver.
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_HARDWARE_BREAK
|
|
|
|
* Hardware handles break signals. Pass the requested timeout to the
|
|
|
|
* &tty_operations.break_ctl instead of using a simple on/off interface.
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_DYNAMIC_ALLOC
|
|
|
|
* Do not allocate structures which are needed per line for this driver
|
|
|
|
* (&tty_driver.ports) as it would waste memory. The driver will take
|
|
|
|
* care. This is only applicable to the PTY driver.
|
|
|
|
*
|
|
|
|
* TTY_DRIVER_UNNUMBERED_NODE
|
|
|
|
* Do not create numbered ``/dev`` nodes. For example, create
|
|
|
|
* ``/dev/ttyprintk`` and not ``/dev/ttyprintk0``. Applicable only when a
|
|
|
|
* driver for a single tty device is being allocated.
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
#define TTY_DRIVER_INSTALLED 0x0001
|
|
|
|
#define TTY_DRIVER_RESET_TERMIOS 0x0002
|
|
|
|
#define TTY_DRIVER_REAL_RAW 0x0004
|
2005-06-21 12:15:16 +08:00
|
|
|
#define TTY_DRIVER_DYNAMIC_DEV 0x0008
|
2005-04-17 06:20:36 +08:00
|
|
|
#define TTY_DRIVER_DEVPTS_MEM 0x0010
|
2008-07-22 18:18:03 +08:00
|
|
|
#define TTY_DRIVER_HARDWARE_BREAK 0x0020
|
2012-08-09 04:26:41 +08:00
|
|
|
#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040
|
2012-08-09 04:26:43 +08:00
|
|
|
#define TTY_DRIVER_UNNUMBERED_NODE 0x0080
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* tty driver types */
|
|
|
|
#define TTY_DRIVER_TYPE_SYSTEM 0x0001
|
|
|
|
#define TTY_DRIVER_TYPE_CONSOLE 0x0002
|
|
|
|
#define TTY_DRIVER_TYPE_SERIAL 0x0003
|
|
|
|
#define TTY_DRIVER_TYPE_PTY 0x0004
|
|
|
|
#define TTY_DRIVER_TYPE_SCC 0x0005 /* scc driver */
|
|
|
|
#define TTY_DRIVER_TYPE_SYSCONS 0x0006
|
|
|
|
|
|
|
|
/* system subtypes (magic, used by tty_io.c) */
|
|
|
|
#define SYSTEM_TYPE_TTY 0x0001
|
|
|
|
#define SYSTEM_TYPE_CONSOLE 0x0002
|
|
|
|
#define SYSTEM_TYPE_SYSCONS 0x0003
|
|
|
|
#define SYSTEM_TYPE_SYSPTMX 0x0004
|
|
|
|
|
|
|
|
/* pty subtypes (magic, used by tty_io.c) */
|
|
|
|
#define PTY_TYPE_MASTER 0x0001
|
|
|
|
#define PTY_TYPE_SLAVE 0x0002
|
|
|
|
|
|
|
|
/* serial subtype definitions */
|
|
|
|
#define SERIAL_TYPE_NORMAL 1
|
|
|
|
|
2021-07-23 18:31:40 +08:00
|
|
|
int tty_register_driver(struct tty_driver *driver);
|
|
|
|
void tty_unregister_driver(struct tty_driver *driver);
|
|
|
|
struct device *tty_register_device(struct tty_driver *driver, unsigned index,
|
|
|
|
struct device *dev);
|
|
|
|
struct device *tty_register_device_attr(struct tty_driver *driver,
|
|
|
|
unsigned index, struct device *device, void *drvdata,
|
|
|
|
const struct attribute_group **attr_grp);
|
|
|
|
void tty_unregister_device(struct tty_driver *driver, unsigned index);
|
|
|
|
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
|
|
void proc_tty_register_driver(struct tty_driver *);
|
|
|
|
void proc_tty_unregister_driver(struct tty_driver *);
|
|
|
|
#else
|
|
|
|
static inline void proc_tty_register_driver(struct tty_driver *d) {}
|
|
|
|
static inline void proc_tty_unregister_driver(struct tty_driver *d) {}
|
|
|
|
#endif
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif /* #ifdef _LINUX_TTY_DRIVER_H */
|