MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Extended Library Functions                        readvtoc(3EXT)



NAME
     readvtoc, writevtoc - read and write a disk's VTOC

SYNOPSIS
     cc [ flag ... ] file ... -ladm [ library ... ]
     #include 

     int readvtoc(int fd, struct vtoc *vtoc);


     int writevtoc(int fd, struct vtoc *vtoc);


     int readextvtoc(int fd, struct extvtoc *extvtoc);


     int writeextvtoc(int fd, struct extvtoc *extvtoc);


DESCRIPTION
     The readvtoc() and readextvtoc() functions return the VTOC
     (volume   table   of contents)  structure  that is stored on
     the disk associated with the open  file  descriptor  fd.  On
     disks larger than 1 TB readextvtoc() must be used.


     The writevtoc() and  writeextvtoc()  function  stores  the
     VTOC  structure  on  the  disk associated with the open file
     descriptor fd. On  disks  larger  then  1TB  writeextvtoc()
     function must be used.


     The fd argument refers to any slice on a raw disk.

RETURN VALUES
     Upon successful completion, readvtoc()  and  readextvtoc()
     return a positive integer indicating the slice index associ-
     ated with the open file descriptor. Otherwise, they return a
     negative integer indicating one of the following errors:

     VTEIO         An I/O error occurred.


     VTENOTSUP     This operation is not supported on this disk.


     VTEROR       An unknown error occurred.


     VTOVERFLOW    The caller attempted  an  operation  that  is
                    illegal  on  the  disk  and  may overflow the
                    fields in the data structure.



SunOS 5.11           Last change: 7 Oct 2008                    1






Extended Library Functions                        readvtoc(3EXT)



     Upon successful completion, writevtoc() and writeextvtoc()
     return 0. Otherwise, they return a negative integer indicat-
     ing one of the following errors:

     VTEINVAL      The VTOC contains an incorrect field.


     VTEIO         An I/O error occurred.


     VTENOTSUP     This operation is not supported on this disk.


     VTEROR       An unknown error occurred.


     VTOVERFLOW    The caller attempted  an  operation  that  is
                    illegal  on  the  disk  and  may overflow the
                    fields in the data structure.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Unsafe                      
    


SEE ALSO
     fmthard(1M),     format(1M),     prtvtoc(1M),      ioctl(2),
     efiallocandinit(3EXT), attributes(5), dkio(7I)

BUGS
     The writevtoc() function cannot write a  VTOC on  an  unla-
     beled disk. Use format(1M) for this purpose.














SunOS 5.11           Last change: 7 Oct 2008                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™