0 0 1
default
Jean-Francois Pieronne - 5 years ago 2014-10-20 18:21:01
jf.pieronne@laposte.net
Initial version of getdvi.py
1 file changed with 12 insertions and 0 deletions:
↑ Collapse Diff ↑
 
new file 100755
1
 
from vms.rtl.lib import getdvi
2
 
from vms.dvidef import DVI__FULLDEVNAM, DVI__FREEBLOCKS, DVI__LOGVOLNAM
3
 
disk = "SYS$SYSDEVICE"
4
 
# get the node name and device name
5
 
devnam = getdvi(DVI__FULLDEVNAM, device_name=disk)[2]
6
 
# get the logical name of the volume
7
 
logvolnam = getdvi(DVI__LOGVOLNAM, device_name=disk)[2]
8
 
# get the number of free blocks on the disk
9
 
freeblocks = getdvi(DVI__FREEBLOCKS, device_name=disk)[1]
10
 
# print results
11
 
print 'disk %s:\n\tlogical name %s\n\t%d free blocks' % (devnam, logvolnam,
12
 
                                                         freeblocks)
0 comments (0 inline, 0 general)