Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opendev(3) [osx 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

KPARTX(8)						   Linux Administrator's Manual 						 KPARTX(8)

NAME
kpartx - Create device maps from partition tables SYNOPSIS
kpartx [-a | -d | -l] [-v] wholedisk DESCRIPTION
This tool, derived from util-linux' partx, reads partition tables on specified device and create device maps over partitions segments detected. It is called from hotplug upon device maps creation and deletion. OPTIONS
-a Add partition mappings -r Read-only partition mappings -d Delete partition mappings -u Update partition mappings -l List partition mappings that would be added -a -p set device name-partition number delimiter -f force creation of mappings; overrides 'no_partitions' feature -g force GUID partition table (GPT) -v Operate verbosely -s Sync mode. Don't return until the partitions are created EXAMPLE
To mount all the partitions in a raw disk image: kpartx -av disk.img This will output lines such as: loop3p1 : 0 20964762 /dev/loop3 63 The loop3p1 is the name of a device file under /dev/mapper which you can use to access the partition, for example to fsck it: fsck /dev/mapper/loop3p1 When you're done, you need to remove the devices: kpartx -d disk.img SEE ALSO
multipath(8) multipathd(8) hotplug(8) AUTHORS
This man page was assembled By Patrick Caulfield for the Debian project. From documentation provided by the multipath author Christophe Varoqui, <christophe.varoqui@opensvc.com> and others. July 2006 KPARTX(8)
Man Page