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:
Mark Bixby <[log in to unmask]>
Reply To:
Date:
Wed, 16 Dec 1998 15:19:02 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (56 lines)
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.

HPVOLINFO doesn't appear to be an OPTION EXTENSIBLE function, so there shouldn't
be any hidden number of parameters argument.  Actually, if I specify one, it
croaks badly with an unrecovered ESCAPE.

Here's my code; please tell me what I'm doing wrong:

#include <stdio.h>
#include <string.h>
#define _MPEXL_SOURCE
#include <errno.h>

int main(int argc, char **argv) {

short fserror, itemerror, itemnums[]={35,0};
char vsname[33], volspecifier[35];
long long lcapacity, lfreespace;
t_mpe_status status;

extern FLABELINFO(char *formaldesig, short mode, short *fserrorcode, short *iten
num, void *item, short *itemerror);
extern HPVOLINFO(t_mpe_status *status, short volspecifiernum, void *volspecifier
,
short itemnum1, void *itemptr1,
short itemnum2, void *itemptr2,
short itemnum3, void *itemptr3,
short itemnum4, void *itemptr4,
short itemnum5, void *itemptr5,
short itemnum6, void *itemptr6);

vsname[0] = '\0'; /* initialize the volumeset name to a null string */

/* Obtain the file's volumeset name */
FLABELINFO(argv[1],0,&fserror,(short *)&itemnums,&vsname,&itemerror);
if (fserror == 0) {
  vsname[32] = '\0'; /* make it a legal C string */
  sprintf(volspecifier," %s ",strtok(vsname," "));

  /* Obtain the capacity and freespace */
  HPVOLINFO(&status,2,&volspecifier,14,&lcapacity,40,&lfreespace,0,NULL,0,NULL,0
,NULL,0,NULL);
  printf("HPVOLINFO status = (%hd, %hd)\n",status.decode.error_num,status.decode
.subsys_num);
}

}
--
Mark Bixby                      E-mail: [log in to unmask]
Coast Community College Dist.   Web: http://www.cccd.edu/~markb/
District Information Services   1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support               Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)

ATOM RSS1 RSS2