This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



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/rdisk_s3 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 over-written overwritten
     written by subsequent calls.

SEE ALSO
     open(2)

HISTORY
     The opendev() function first appeared in OpenBSD 1.2.

BSD                                           December 12, 2002                                          BSD

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...