Browse Source

o) start new sentence on a new line;

o) always close .Bl tags;
o) fix usage of .Xr;
millert@ ok
OPENBSD_3_2
mpech 22 years ago
parent
commit
bc299477ad
8 changed files with 65 additions and 44 deletions
  1. +3
    -2
      src/lib/libutil/fparseln.3
  2. +3
    -2
      src/lib/libutil/opendev.3
  3. +7
    -4
      src/lib/libutil/openpty.3
  4. +3
    -2
      src/lib/libutil/pw_getconf.3
  5. +11
    -6
      src/lib/libutil/pw_init.3
  6. +5
    -3
      src/lib/libutil/pw_lock.3
  7. +24
    -18
      src/lib/libutil/scsi.3
  8. +9
    -7
      src/lib/libutil/uucplock.3

+ 3
- 2
src/lib/libutil/fparseln.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: fparseln.3,v 1.4 2000/01/05 18:51:11 deraadt Exp $
.\" $OpenBSD: fparseln.3,v 1.5 2002/05/01 08:03:30 mpech Exp $
.\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $ .\" $NetBSD: fparseln.3,v 1.7 1999/07/02 15:49:12 simonb Exp $
.\" .\"
.\" Copyright (c) 1997 Christos Zoulas. All rights reserved. .\" Copyright (c) 1997 Christos Zoulas. All rights reserved.
@ -49,7 +49,8 @@ function
returns a pointer to the next logical line from the stream referenced by returns a pointer to the next logical line from the stream referenced by
.Fa stream . .Fa stream .
This string is null terminated and dynamically allocated on each This string is null terminated and dynamically allocated on each
invocation. It is the responsibility of the caller to free the pointer.
invocation.
It is the responsibility of the caller to free the pointer.
.Pp .Pp
By default, if a character is escaped, both it and the preceding escape By default, if a character is escaped, both it and the preceding escape
character will be present in the returned string. character will be present in the returned string.


+ 3
- 2
src/lib/libutil/opendev.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: opendev.3,v 1.14 2002/04/30 16:31:42 mpech Exp $
.\" $OpenBSD: opendev.3,v 1.15 2002/05/01 08:03:30 mpech Exp $
.\" .\"
.\" Copyright (c) 2000, Todd C. Miller. All rights reserved. .\" Copyright (c) 2000, Todd C. Miller. All rights reserved.
.\" Copyright (c) 1996, Jason Downs. All rights reserved. .\" Copyright (c) 1996, Jason Downs. All rights reserved.
@ -39,7 +39,8 @@ The
.Fn opendev .Fn opendev
function opens a device using the function opens a device using the
.Dq short form .Dq short form
name. This is typically
name.
This is typically
.Dq sd0 .Dq sd0
or or
.Dq sd0c , .Dq sd0c ,


+ 7
- 4
src/lib/libutil/openpty.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: openpty.3,v 1.7 2001/07/13 22:14:07 millert Exp $
.\" $OpenBSD: openpty.3,v 1.8 2002/05/01 08:03:30 mpech Exp $
.\" Copyright (c) 1995 .\" Copyright (c) 1995
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
.\" .\"
@ -103,12 +103,14 @@ function combines
.Fn fork , .Fn fork ,
and and
.Fn login_tty .Fn login_tty
to creates a new process operating in a pseudo-tty. The file
to creates a new process operating in a pseudo-tty.
The file
descriptor of the master side of the pseudo-tty is returned in descriptor of the master side of the pseudo-tty is returned in
.Fa amaster , .Fa amaster ,
and the filename of the slave in and the filename of the slave in
.Fa name .Fa name
if it is non-null. The
if it is non-null.
The
.Fa termp .Fa termp
and and
.Fa winp .Fa winp
@ -122,7 +124,8 @@ or
.Fn forkpty .Fn forkpty
is not successful, \-1 is returned and is not successful, \-1 is returned and
.Va errno .Va errno
is set to indicate the error. Otherwise,
is set to indicate the error.
Otherwise,
.Fn openpty , .Fn openpty ,
.Fn login_tty , .Fn login_tty ,
and the child process of and the child process of


+ 3
- 2
src/lib/libutil/pw_getconf.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: pw_getconf.3,v 1.7 2001/06/18 21:09:23 millert Exp $
.\" $OpenBSD: pw_getconf.3,v 1.8 2002/05/01 08:03:30 mpech Exp $
.\" .\"
.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> .\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
.\" All rights reserved. .\" All rights reserved.
@ -64,7 +64,8 @@ an empty string will be returned in data.
.Pp .Pp
For default values the key For default values the key
.Pa default .Pa default
can be used. This might be useful when no entry was found
can be used.
This might be useful when no entry was found
for a specific key or option. for a specific key or option.
.Pp .Pp
An empty string is also returned for other errors. An empty string is also returned for other errors.


+ 11
- 6
src/lib/libutil/pw_init.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: pw_init.3,v 1.4 1999/09/23 04:12:01 alex Exp $
.\" $OpenBSD: pw_init.3,v 1.5 2002/05/01 08:03:30 mpech Exp $
.\" .\"
.\" Copyright (c) 1995 .\" Copyright (c) 1995
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -69,7 +69,8 @@
.Fn pw_error "const char *name" "int err" "int eval" .Fn pw_error "const char *name" "int err" "int eval"
.Sh DESCRIPTION .Sh DESCRIPTION
These functions are designed as conveniences for interactive programs These functions are designed as conveniences for interactive programs
which update the passwd file and do nothing else. They generally
which update the passwd file and do nothing else.
They generally
handle errors by printing out a message to the standard error stream handle errors by printing out a message to the standard error stream
and possibly aborting the process. and possibly aborting the process.
.Pp .Pp
@ -83,7 +84,8 @@ disabling most signals.
The The
.Fn pw_setdir .Fn pw_setdir
function sets an alternative directory where the rest of the functions looks function sets an alternative directory where the rest of the functions looks
for password-related files. Use this if you are writing utilities that should
for password-related files.
Use this if you are writing utilities that should
be able to handle password files outside of /etc. be able to handle password files outside of /etc.
.Pp .Pp
The The
@ -91,7 +93,8 @@ The
function transforms filenames so that they end up in the directory specified function transforms filenames so that they end up in the directory specified
to the latest to the latest
.Fn pw_setdir .Fn pw_setdir
call. The rule is that all directories are stripped off the given name and
call.
The rule is that all directories are stripped off the given name and
only the filename is appended to the directory. only the filename is appended to the directory.
.Pp .Pp
The The
@ -104,7 +107,8 @@ if EDITOR is not set) on the file
.Pa /etc/ptmp .Pa /etc/ptmp
if if
.Fa filename .Fa filename
is NULL). If
is NULL).
If
.Fa notsetuid .Fa notsetuid
is nonzero, is nonzero,
.Fn pw_edit .Fn pw_edit
@ -170,7 +174,8 @@ is empty.
The The
.Fn pw_error .Fn pw_error
function displays an error message, aborts the current passwd update, function displays an error message, aborts the current passwd update,
and exits the current process. If
and exits the current process.
If
.Fa err .Fa err
is non-zero, a warning message beginning with is non-zero, a warning message beginning with
.Fa name .Fa name


+ 5
- 3
src/lib/libutil/pw_lock.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: pw_lock.3,v 1.8 2001/08/26 03:28:30 millert Exp $
.\" $OpenBSD: pw_lock.3,v 1.9 2002/05/01 08:03:30 mpech Exp $
.\" .\"
.\" Copyright (c) 1995 .\" Copyright (c) 1995
.\" The Regents of the University of California. All rights reserved. .\" The Regents of the University of California. All rights reserved.
@ -65,13 +65,15 @@ function attempts to lock the passwd database by creating the file
.Pa /etc/ptmp .Pa /etc/ptmp
with an exclusive lock (using with an exclusive lock (using
.Xr flock 2 .Xr flock 2
semantics) and returns the file descriptor of that file. If
semantics) and returns the file descriptor of that file.
If
.Fa retries .Fa retries
is greater than zero, is greater than zero,
.Fn pw_lock .Fn pw_lock
will try multiple times to open will try multiple times to open
.Pa /etc/ptmp , .Pa /etc/ptmp ,
waiting one second between tries. In addition to being a lock file,
waiting one second between tries.
In addition to being a lock file,
.Pa /etc/ptmp .Pa /etc/ptmp
will also hold the contents of the new passwd file. will also hold the contents of the new passwd file.
.Pp .Pp


+ 24
- 18
src/lib/libutil/scsi.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: scsi.3,v 1.6 2000/11/10 00:06:27 deraadt Exp $
.\" $OpenBSD: scsi.3,v 1.7 2002/05/01 08:03:30 mpech Exp $
.\" Copyright (c) 1994 HD Associates (hd@world.std.com) .\" Copyright (c) 1994 HD Associates (hd@world.std.com)
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -79,7 +79,8 @@ use the SCIOCCOMMAND
of the SCSI subsystem of the SCSI subsystem
to provide user level access to SCSI commands. to provide user level access to SCSI commands.
The programmer must know the SCSI CDB (Command Descriptor The programmer must know the SCSI CDB (Command Descriptor
Block) to perform the desired command. These functions assist in
Block) to perform the desired command.
These functions assist in
building up the CDB, submitting it to the SCSI subsystem, and decoding building up the CDB, submitting it to the SCSI subsystem, and decoding
the result. the result.
.Pp .Pp
@ -89,7 +90,8 @@ command before using the library directly - simple programs are
best implemented as scripts using that facility. best implemented as scripts using that facility.
.Pp .Pp
To provide for security, To provide for security,
not all devices accept the SCIOCCOMAND ioctl. It is accepted by the
not all devices accept the SCIOCCOMAND ioctl.
It is accepted by the
control device for tape drives, partition D for disk drives, partition C control device for tape drives, partition D for disk drives, partition C
for CD ROM drives, and any "unknown" device. for CD ROM drives, and any "unknown" device.
The "super scsi" The "super scsi"
@ -145,8 +147,8 @@ determined by the
argument. argument.
.Pp .Pp
.Fr buf .Fr buf
is the data buffer used during the SCSI data phase. If it is NULL it
is allocated via malloc and
is the data buffer used during the SCSI data phase.
If it is NULL it is allocated via malloc and
.Ar scsireq->databuf .Ar scsireq->databuf
is set to point to the newly allocated memory. is set to point to the newly allocated memory.
.Pp .Pp
@ -171,17 +173,17 @@ indicates a data out phase (a transfer out of the user buffer).
.Pp .Pp
.Fr fmt .Fr fmt
is a CDB format specifier used to build up the SCSI CDB. is a CDB format specifier used to build up the SCSI CDB.
This text string is made up of a list of field specifiers. Field
specifiers specify the value for each CDB field (including indicating
This text string is made up of a list of field specifiers.
Field specifiers specify the value for each CDB field (including indicating
that the value be taken from the next argument in the that the value be taken from the next argument in the
variable argument list), the width variable argument list), the width
of the field in bits or bytes, and an optional name. White space is
ignored, and the pound sign ('#') introduces a comment that ends at the
end of the current line.
of the field in bits or bytes, and an optional name.
White space is ignored, and the pound sign ('#') introduces a comment that
ends at the end of the current line.
.Pp .Pp
The optional name is the first part of a field specifier and The optional name is the first part of a field specifier and
is in curly braces. The text in curly braces in this example are
the names:
is in curly braces.
The text in curly braces in this example are the names:
.Bd -literal -offset indent .Bd -literal -offset indent
.Fr "{PS} v:b1 {Reserved} 0:b1 {Page Code} v:b6 # Mode select page" .Fr "{PS} v:b1 {Reserved} 0:b1 {Page Code} v:b6 # Mode select page"
.Ed .Ed
@ -277,8 +279,8 @@ described above in
.Fn scsireq_decode . .Fn scsireq_decode .
.Pp .Pp
.Fn scsireq_encode .Fn scsireq_encode
encodes the data phase section of the structure. The encoding is
handled identically as the encoding of the CDB structure by
encodes the data phase section of the structure.
The encoding is handled identically as the encoding of the CDB structure by
.Fn scsireq_build .Fn scsireq_build
.Pp .Pp
.Fn scsireq_enter .Fn scsireq_enter
@ -330,11 +332,14 @@ returns the result of the ioctl call.
.Xr scsi 4 , .Xr scsi 4 ,
.Xr scsi 8 .Xr scsi 8
.Sh BUGS .Sh BUGS
This only works completely for the 1542C. The host adapter code
This only works completely for the 1542C.
The host adapter code
that sets up the residual amount of data transfer has to be added that sets up the residual amount of data transfer has to be added
to each individual adapter. This library is usable on the other
to each individual adapter.
This library is usable on the other
host adapters; however, the SCSI driver pretends that the proper host adapters; however, the SCSI driver pretends that the proper
amount of data is always transferred. If you have an Adaptec 174x
amount of data is always transferred.
If you have an Adaptec 174x
and can hack contact dufault@hda.com and you can have the code to and can hack contact dufault@hda.com and you can have the code to
calculate residual data for the 174x series to integrate and test. calculate residual data for the 174x series to integrate and test.
.Sh HISTORY .Sh HISTORY
@ -342,7 +347,8 @@ Many systems have comparable interfaces to permit a user to construct a
SCSI command in user space. SCSI command in user space.
.Pp .Pp
The data structure is almost identical to the SGI /dev/scsi data The data structure is almost identical to the SGI /dev/scsi data
structure. If anyone knows the name of the authors it should
structure.
If anyone knows the name of the authors it should
go here; Peter Dufault first read about it in a 1989 Sun Expert magazine. go here; Peter Dufault first read about it in a 1989 Sun Expert magazine.
.Pp .Pp
Peter Dufault implemented a clone of SGI's interface in 386bsd that Peter Dufault implemented a clone of SGI's interface in 386bsd that


+ 9
- 7
src/lib/libutil/uucplock.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: uucplock.3,v 1.12 2001/08/06 10:42:26 mpech Exp $
.\" $OpenBSD: uucplock.3,v 1.13 2002/05/01 08:03:30 mpech Exp $
.\" .\"
.\" All rights reserved. .\" All rights reserved.
.\" .\"
@ -123,7 +123,8 @@ the reason for failure is returned.
.Fn uu_lockerr .Fn uu_lockerr
uses the current value of uses the current value of
.Va errno .Va errno
to determine the exact error. Care should be made not to allow
to determine the exact error.
Care should be made not to allow
.Va errno .Va errno
to be changed between calls to to be changed between calls to
.Fn uu_lock .Fn uu_lock
@ -134,8 +135,8 @@ and
may return any of the following values: may return any of the following values:
.Pp .Pp
.Dv UU_LOCK_OK : .Dv UU_LOCK_OK :
The transfer was successful. The specified process now holds the device
lock.
The transfer was successful.
The specified process now holds the device lock.
.Pp .Pp
.Dv UU_LOCK_OWNER_ERR : .Dv UU_LOCK_OWNER_ERR :
The current process does not already own a lock on the specified device. The current process does not already own a lock on the specified device.
@ -148,8 +149,8 @@ If
.Fn uu_lock .Fn uu_lock
returns one of the error values above, the global value returns one of the error values above, the global value
.Va errno .Va errno
can be used to determine the cause. Refer to the respective manual pages
for further details.
can be used to determine the cause.
Refer to the respective manual pages for further details.
.Pp .Pp
.Fn uu_unlock .Fn uu_unlock
will set the global variable will set the global variable
@ -170,6 +171,7 @@ the stale lock.
.Pp .Pp
The calling process must have write permissions to the The calling process must have write permissions to the
.Pa /var/spool/lock .Pa /var/spool/lock
directory. There is no mechanism in place to ensure that the
directory.
There is no mechanism in place to ensure that the
permissions of this directory are the same as those of the permissions of this directory are the same as those of the
serial devices that might be locked. serial devices that might be locked.

Loading…
Cancel
Save