Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opendev(3) [mojave man page]

OPENDEV(3)						   BSD Library Functions Manual 						OPENDEV(3)

NAME
opendev -- short form device open routine SYNOPSIS
#include <util.h> int opendev(char *path, int oflags, int dflags, char **realpath); DESCRIPTION
The opendev() function opens a device using the ``short form'' name. This is typically ``disk0s3'', for instance, which will be expanded to /dev/rdisk0s3 on most architectures. Device name lookup is done by first checking path for a ``/'' and if one is found attempting to open that file. Otherwise /dev is searched for a matching device. The oflags are the same as the flags passed to open(2). The dflags are specified by OR'ing the following values: OPENDEV_PART attempt to open the raw partition during expansion OPENDEV_BLCK open the block device (default is character device) The ``raw'' partition is defined as the partition which provides access to the entire disk, regardless of the disk's partition map. If realpath is not NULL, it is modified to point at the fully expanded device name. RETURN VALUES
The opendev() return value and errors are the same as the return value and errors of open(2). WARNINGS
If realpath is not NULL, on return it will point to internal static storage space that will be overwritten by subsequent calls. SEE ALSO
open(2) HISTORY
The opendev() function first appeared in OpenBSD 1.2. BSD
December 12, 2002 BSD

Check Out this Related Man Page

REPARTITION(8)						      System Manager's Manual						    REPARTITION(8)

NAME
repartition - load a partition table SYNOPSIS
repartition device [partition-file] DESCRIPTION
Repartition uploads a new partition table for the partitions of device. The table is obtained from the first sector of partition-file if given, device otherwise. Device may refer to the whole drive or a primary partition, depending on whether you want to upload a partition or a subpartition table. The partitions will be truncated to fit within the enclosing device like the disk driver does, unless the numbers are coming from partition-file. EXAMPLES
repartition /dev/hd0 repartition /dev/hd4 /etc/hd4.table Reload the partition table of drive 0 setting /dev/hd[1-4], and the subpartition table of /dev/hd4 setting /dev/hd4[a-d] using a file. The latter may be useful if you need more than the 4 subpartitions a single Minix partition gives you. DIAGNOSTICS
The new table is printed on standard output. FILES
/dev/hd[0-9] SEE ALSO
hd(4), part(8). BUGS
The disk must be in use for the changes to stick. The partition table of an idle disk will be reloaded on the first open. AUTHOR
Kees J. Bot (kjb@cs.vu.nl) REPARTITION(8)
Man Page