From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d5f1800da7e00146 X-Google-Attributes: gidfee84,public From: harris@zk3.dec.com (Bob Harris) Subject: Re: Problem with quotactl Date: 1997/05/05 Message-ID: #1/1 X-Deja-AN: 239503891 References: <336D0DD3.28551810@ramius.demon.co.uk> Organization: Digital Equipment Corporation Newsgroups: comp.unix.osf.osf1 In article <336D0DD3.28551810@ramius.demon.co.uk>, Mark Nelson wrote: >I'm trying to port a program from a sun running 4.1.3 to OSF1, the >uname output of the development machine is OSF1 leo V3.2 41 alpha and >the output of the uname command machine on which the program will >eventually >run is OSF1 scorpio.tees.ac.uk V3.2 148 alpha. > >To access the quota information I am using the quotactl system call, >which >according to the man page it takes the following parameters - > >quotactl(device,QCMD(GETQUOTA,USRQUOTA),uid,"a); > >Unfortunatly when I run the program I get error 22 returned when I >try to do a getquota call. Below is the output of program - > ># df /usr >Filesystem 512-blocks Used Avail Capacity Mounted on >/dev/rz0g 1603526 1126522 316650 78% /usr ># ./a.out /dev/rz0g cmt17 1 3 >417 >-2147404728 1023 >3 1 >setting Quota >error 22 returned from quotactl(Q_SETQUOTA) You are going to kick yourself. The man page says path Specifies the pathname of any file within the mounted file sys- tem. You specified the device, _NOT_ a file _WITHIN_ the mounted file system. Change your command line to ./a.out /usr cmt17 1 3 and you should make forward progress in debugging your program. I have not looked at your code, so I don't know if there are any other problems or if you are all set now. -- Bob Harris "I don't get to tell me what to do, I only get to tell me how to do it." Comments expressed here are my own and _NOT_ those of my employer.