summaryrefslogtreecommitdiffstats
path: root/lib/libutil/opendev.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do not mask errno if we fail to open /dev/diskmap. Also, fall throughjsing2011-06-301-4/+1
| | | | | | rather than returning so that realname still gets assigned. ok millert@ deraadt@ thib@
* Do not attempt to prepend /dev/ to path if it already contains a slash.millert2010-12-221-17/+19
| | | | OK jsing@
* Always return a pointer to the static buffer in realpath, even ifmillert2010-12-211-13/+10
| | | | | path and realpath are the same. This matches the manual and avoids a bogus cast to non-const. OK jsing@, previous version OK kettenis@
* opendev() path argument should be const. OK deraadt@millert2010-12-171-3/+3
|
* Factor out DUID identification code so that it can easily be reused.jsing2010-11-151-24/+2
| | | | ok krw@
* add missing headers needed for close() and ioctl().chl2010-06-281-1/+3
| | | | ok krw@ millert@
* If a request to opendev(3) is given in the form of a disklabel UID,jsing2010-06-181-3/+51
| | | | | | | | | | open /dev/diskmap and perform a DIOCMAP ioctl in order to open the actual device. As a result, all programs which make use of opendev(3) can now operate with disklabel UIDs. Feedback from millert@ ok millert@ krw@ thib@
* knf; otto okderaadt2004-05-281-8/+4
|
* some -Wall and spaces cleanup, scsi.c left.fgsch2002-06-091-1/+1
| | | | some brave soul should look at it.
* Add OPENDEV_BLCK flag for opening the block devices (the charactermillert2000-04-301-33/+34
| | | | | | | | | | | | | device is opened by default). Don't open the file w/o adding a /dev/ prefix unless the file has a '/' in it. This prevents problems where someone says "disklabel sd0" with a file called "sd0" in the cwd. The OPENDEV_DRCT flag has been deprecated as it is the the default behavior and always has been. Add checks for >= MAXPATHLEN and return ENAMETOOLONG in that case.
* Bring prototypes into scopetholo1996-09-161-1/+2
|
* Use getrawpartition().downsj1996-07-021-3/+3
|
* only write to realpath if non-NULLderaadt1996-06-201-4/+7
|
* util.h: new resting placedownsj1996-06-171-8/+7
| | | | | | opendev.h: ok, so I merged it with util.h opendev.h: use util.h everything else: use "util.h"
* Add opendev(3) to libutil. Used by mt(1), soon by disklabel(8), maybedownsj1996-06-171-0/+86
others. This is a generic version of the code used by mt(1).