⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 creatediskbyname.3x

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 3X
字号:
.\" SCCSID: @(#)creatediskbyname.3x	6.2	8/30/89.TH creatediskbyname 3x.SH Namecreatediskbyname \- get the disk description associated with a file name.SH Syntax.nf.B #include <disktab.h>.PP.B struct disktab *.B creatediskbyname(\fIname\fP).B char *\fIname\fP;.fi.SH Description.NXR "creatediskbyname subroutine".NXR "disk" "getting description"The.PN creatediskbynamesubroutinetakes the name of the character device special file representing a disk device (for example, .PN /dev/rra0a) and returns a structure pointerdescribing its geometry information and the defaultdisk partition tables.  It obtains this information bypolling the controlling disk device driver.  The.PN creatediskbynamesubroutine returns information only for MSCP and SCSI disks..PPThe .PN <disktab.h> file has the following form:.EX 0#define DISKTAB        "/etc/disktab"struct  disktab {      char   *d_name;          /* drive name */      char   *d_type;          /* drive type */      int    d_secsize;        /* sector size in bytes */      int    d_ntracks;        /* # tracks/cylinder */      int    d_nsectors;       /* # sectors/track */      int    d_ncylinders;     /* # cylinders */      int    d_rpm;            /* revolutions/minute */      struct partition {              int     p_size;   /* #sectors in partition */              short   p_bsize;  /* block size in bytes */              short   p_fsize;  /* frag size in bytes */        } d_partitions[8];};struct  disktab *getdiskbyname();struct  disktab *creatediskbyname();.EE.SH DiagnosticsSuccessful completion of the .PN creatediskbynamesubroutine returns a pointer to a valid disktab structure.  Failure ofthis subroutine returns a null pointer.  The subroutinefails if it cannot obtain the necessary information from the devicedriver or disktab file..PPA check is done to ensure that the disktab file exists and is readable.This check ensures that the subroutine is not being calledbecause the disktab file was accidentally removed.  If there is no disktab file, the subroutine fails..PPThe .PN creatediskbynamesubroutine also fails if it cannot determine disk geometryattributes by polling the driver.  This can occur if the disk is notan MSCP or SCSI disk.  In some cases where the disk consistsof removable media and the media is not loaded, the driver will be unable to determine disk attributes..SH RestrictionsThe.PN creatediskbynamesubroutine returns information only for MSCP and SCSI disks..SH See Alsogetdiskbyname(3x), ra(4), rz(4), disktab(5)  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -