1N/A/*************************************************************************** 1N/A * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 1N/A * Licensed under the Academic Free License version 2.1 1N/A **************************************************************************/ 1N/A * Return a copy of a string without trailing spaces. If 'len' is non-zero, 1N/A * it specifies max length, otherwise the string must be null-terminated. 1N/A /* Check if label is utf8 format */ 1N/A * find 1st Primary Volume Descriptor 1N/A * PVD contains size and offset of the LSB/MSB path table 1N/A * Look through path table entries 1N/A /* load sectors on demand */ 1N/A /* only interested in root directories */ 1N/A case 0x08:
/* CD-ROM */ 1N/A case 0x09:
/* CD-R */ 1N/A case 0x0A:
/* CD-RW */ 1N/A case 0x10:
/* DVD-ROM */ 1N/A case 0x11:
/* DVD-R Sequential */ 1N/A case 0x12:
/* DVD-RAM */ 1N/A case 0x13:
/* DVD-RW Restricted Overwrite */ 1N/A case 0x14:
/* DVD-RW Sequential */ 1N/A case 0x1A:
/* DVD+RW */ 1N/A case 0x1B:
/* DVD+R */ 1N/A case 0x2B:
/* DVD+R Double Layer */ 1N/A case 0x40:
/* BD-ROM */ 1N/A case 0x41:
/* BD-R Sequential */ 1N/A case 0x42:
/* BD-R Random */ 1N/A case 0x43:
/* BD-RE */ 1N/A case 0x50:
/* HD DVD-ROM */ 1N/A case 0x51:
/* HD DVD-R */ 1N/A case 0x52:
/* HD DVD-Rewritable */ 1N/A * XXX for some reason CDROMREADTOCENTRY fails on video DVDs, 1N/A * but extracting the toc directly works okay. And the toc 1N/A * data buffer length passed to read_toc() should be the same 1N/A * as the real buffer size. 1N/A * Start with the 'basic' privilege set and then remove any 1N/A * of the 'basic' privileges that will not be needed. 1N/A /* Clear privileges we will not need from the 'basic' set */ 1N/A /* to open logindevperm'd devices */ 1N/A /* Set the permitted privilege set. */ 1N/A /* Clear the limit set. */ 1N/A /* block size and total size */ 1N/A /* driver supports ioctl, but media is not available */ 1N/A /* driver does not support ioctl, e.g. lofi */ 1N/A /* with audio present, create volume even if fs probing fails */ 1N/A * first get partitioning info 1N/A /* for a dos drive find partition offset */ 1N/A * ignore duplicate partitions 1N/A continue;
/* skip self */ 1N/A * now determine fs type 1N/A * XXX We could get better performance from block device, 1N/A * but for now we use raw device because: 1N/A * - fstyp_udfs has a bug that it only works on raw 1N/A * - sd has a bug that causes extremely slow reads