From e8ac42dc5d09570b2a65b411a966880f67a792a9 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Thu, 15 Aug 1996 20:22:59 +0000 Subject: *** empty log message *** --- term/ChangeLog | 8 ++++++++ term/main.c | 6 +++--- term/term.h | 3 +++ term/users.c | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) (limited to 'term') diff --git a/term/ChangeLog b/term/ChangeLog index b61002cf..1e4854c6 100644 --- a/term/ChangeLog +++ b/term/ChangeLog @@ -1,3 +1,11 @@ +Thu Aug 15 16:07:07 1996 Thomas Bushnell, n/BSG + + * users.c (trivfs_S_io_pathconf): Implement function. + + * term.h (QUEUE_HIWAT, QUEUE_LOWAT): New macros. + * main.c (main): Use these new macros to create inputq, rawq, and + outputq. + Thu Aug 15 15:32:47 1996 Miles Bader * users.c (trivfs_S_file_check_access): Renamed from diff --git a/term/main.c b/term/main.c index d0702e83..2f8ac449 100644 --- a/term/main.c +++ b/term/main.c @@ -180,9 +180,9 @@ main (int argc, char **argv) term_owner = term_group = 0; term_mode = (bottom == &ptyio_bottom ? 0666 : 0600) | S_IFCHR; - inputq = create_queue (256, 100, 300); - rawq = create_queue (256, 100, 300); - outputq = create_queue (256, 100, 300); + inputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); + rawq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); + outputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); if (bottom == &ptyio_bottom) ptyio_init (); diff --git a/term/term.h b/term/term.h index b30ac826..05c44b51 100644 --- a/term/term.h +++ b/term/term.h @@ -70,6 +70,9 @@ long termflags; #define NO_OWNER 0x00000200 /* there is no foreground_id */ #define ICKY_ASYNC 0x00000400 /* some user has set O_ASYNC */ +#define QUEUE_LOWAT 100 +#define QUEUE_HIWAT 300 + /* Global lock */ struct mutex global_lock; diff --git a/term/users.c b/term/users.c index dbddd5e8..cf89fee5 100644 --- a/term/users.c +++ b/term/users.c @@ -741,6 +741,46 @@ trivfs_S_io_read (struct trivfs_protid *cred, return !*datalen && cancel ? EINTR : 0; } +error_t +trivfs_S_io_pathconf (struct trivfs_protid *cred, + mach_port_t reply, + mach_msg_type_name_t reply_type, + int name, + int *val) +{ + if (!cred) + return EOPNOTSUPP; + + switch (name) + { + case _PC_LINK_MAX: + case _PC_NAME_MAX: + case _PC_PATH_MAX: + case _PC_PIPE_BUF: + case _PC_NO_TRUNC: + default: + return io_pathconf (cred->realnode, name, val); + + case _PC_MAX_CANON: + *val = rawq->hiwat; + return 0; + + case _PC_MAX_INPUT: + *val = inputq->hiwat; + return 0; + + case _PC_CHOWN_RESTRICTED: + /* We implement this locally, remember... */ + *val = 1; + return 0; + + case _PC_VDISABLE: + *val = _POSIX_VDISABLE; + return 0; + } +} + + error_t trivfs_S_io_readable (struct trivfs_protid *cred, mach_port_t reply, -- cgit v1.2.3