HP3000-L Archives

December 1998, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Wed, 16 Dec 1998 16:04:55 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (149 lines)
Mark writes:

> I must be missing something obvious here.  I'm trying to call HPVOLINFO from
> gcc.  It's always returning status=(-151,163) which means unpaired itemnum or
> itemptr.

You're missing two things, neither are obvious!

> HPVOLINFO doesn't appear to be an OPTION EXTENSIBLE function, so there shouldn't
                    ^^^^^^

<plug> with CSEQ, there's no doubt ...see sample output at end </plug>

>   HPVOLINFO(&status,2,&volspecifier,14,&lcapacity,40,&lfreespace,0,NULL,0,NULL,0
> ,NULL,0,NULL);


Just a guess...what if HPVOLINFO is different (@#!@$$) from all the rest of
the "extendable" intrinsics in yet another way?  (It already doesn't have
an "extensible" count :(

For most intrinsics like this, you use 0 to specify "omitted item number".

But...wait...what's that CSEQ is telling us?  (You *do have* CSEQ don't you?)

Did I mention that I'd never try to call an intrinsic from gcc without
using CSEQ first? :)

CSEQ tells us the "proper" default values for omitted item numbers is
$b70f (0xb70f) ... *NOT* 0.

Sheesh.  Chalk another annoying needless quirk for HPVOLINFO.

So...I changed your program to use 0xb70f.  Close, but no cigar (the
error changed from -151 to -157 (?), which was "no such volume set").

Hmmm...ok, let's use a non-blank, as shown in the CSEQ comments....
I changed your sprintf to use "-" instead of " " to surround the
volume set name.  (I'd have used "%", but that's a pain in C)

...and...it worked.

SS


:cseq hpvolinfo

CSEQ [2.4] - LPS Toolbox [A.03c]            (c) 1995 Lund Performance Solutions


Procedure HPVOLINFO (
   status       : anyvar int32   ;        {R26} := nil
   volspecifiernum:        int16   ;      {R25} := 0
   volspecifier : anyvar record  ;        {R24} := nil
   itemnum_1    :        int16   ;        {R23} := $b70f
   item_1       : anyvar record  ;        {SP-$0034} := nil
   itemnum_2    :        int16   ;        {SP-$0036} := $b70f
   item_2       : anyvar record  ;        {SP-$003c} := nil
   itemnum_3    :        int16   ;        {SP-$003e} := $b70f
   item_3       : anyvar record  ;        {SP-$0044} := nil
   itemnum_4    :        int16   ;        {SP-$0046} := $b70f
   item_4       : anyvar record  ;        {SP-$004c} := nil
   itemnum_5    :        int16   ;        {SP-$004e} := $b70f
   item_5       : anyvar record  ;        {SP-$0054} := nil
   itemnum_6    :        int16   ;        {SP-$0056} := $b70f
   item_6       : anyvar record  )        {SP-$005c} := nil
   {volspecifiernum defines format of volspecifier:                    }
   {  0 = volspecifier is ignored (i.e:                                }
   {         use all volumes on system)                                }
   {  1 = ldev of volume  (in 16 bit integer!)                         }
   {  2 = %volume_set_name%                                            }
   {  3 = %volume_set_name:volume_class_name%                          }
   {  4 = %volume_set_name:volume_name%                                }
   {  5 = %device_class_name%                                          }
   {volspecifier                                                       }
   {  either a 16-bit integer (#1 above), or                           }
   {  a character array delimited by "%" characters.                   }
   {Item#s  (and returned data type)                                   }
   {  2 i32  # volume sets configured (specifiernum=0!)                }
   {  3 ca   list of volume set names                                  }
   {         (first 32-bits of itemval MUST be the                     }
   {         max # of 32-byte names that can fit.)                     }
   {         On output, first 32-bits reports # names.                 }
   {         Rest of output is array of 32-char names.                 }
   {  4 i32  # volume classes for specifier.                           }
   {  5 ca   list of volume classes                                    }
   {         (first 32-bits of itemval MUST be the                     }
   {         max # of 32-byte names that can fit.)                     }
   {         On output, first 32-bits reports # names.                 }
   {         Rest of output is array of 32-char names.                 }
   {  6 i32  # volumes MOUNTED                                         }
   {  7 ca   list of volumes                                           }
   {         (first 32-bits of itemval MUST be the                     }
   {         max # of 32-byte names that can fit.)                     }
   {         On output, first 32-bits reports # names.                 }
   {         Rest of output is array of 32-char names.                 }
   {  8 ca13 Drive type (for specifier) (e.g., "HP7935")               }
   {  9 i32  Sector size, in bytes (usually 256)                       }
   { 10 i32  Volume type (1=system, 2=nonsystem)                       }
   { 11 ca32 Volume name                                               }
   { 12 ca32 Volume set name                                           }
   { 13 i16  Ldev (note: 16-bit result)                                }
   {                                                                   }
   { NOTE: items 14..43 are in pairs:                                  }
   {    *** values are for specified volume (if                        }
   {        specifiernum = 1 or 4) or for all volumes                  }
   {        in set or class (for specifiernum = 2 or 3)                }
   {    *** The even numbers return values in                          }
   {        64-bit integers, the odd numbers                           }
   {        return values as 64-bit reals.                             }
   {    *** Most values are in units of sectors.                       }
   {                                                                   }
   { 14 i64  Volume Capacity                                           }
   { 15 f64  Volume Capacity                                           }
   { 16 i64  Total MPE overhead (items 18..28)                         }
   { 17 f64  Total MPE overhead (items 18..28)                         }
   { 18 i64  Transient Space overhead                                  }
   { 19 f64  Transient Space overhead                                  }
   { 20 i64  Transient Space max configured                            }
   { 21 f64  Transient Space max configured                            }
   { 22 i64  MPE V Virtual Memory overhead                             }
   { 23 f64  MPE V Virtual Memory overhead                             }
   { 24 i64  Directory Space overhead                                  }
   { 25 f64  Directory Space overhead                                  }
   { 26 i64  MPE/iX File label overhead                                }
   { 27 f64  MPE/iX File label overhead                                }
   { 28 i64  MPE/iX Transaction Mgmt overhead                          }
   { 29 f64  MPE/iX Transaction Mgmt overhead                          }
   { 30 i64  Spoolfile disk space usage                                }
   { 31 f64  Spoolfile disk space usage                                }
   { 32 i64  Perm File disk space usage                                }
   { 33 f64  Perm File disk space usage                                }
   { 34 i64  Temp File disk space usage  (future?)                     }
   { 35 f64  Temp File disk space usage  (future?)                     }
   { 36 i64  Free Space distribution *array*                           }
   { 37 f64  Free Space distribution *array*                           }
   {         (see manual for items 36, 37)                             }
   { 38 i64  Free Space distribution sectors/range                     }
   { 39 f64  Free Space distribution sectors/range                     }
   {         (see manual for items 38, 39)                             }
   { 40 i64  Total Free space                                          }
   { 41 f64  Total Free space                                          }
   { 42 i64  Largest Contiguous free space                             }
   { 43 f64  Largest Contiguous free space                             }
      uncheckable_anyvar
--
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2