hi , my quota problem is solved .. i was doing a silly mistake : 'quotactl' expects the command ( see man page of quotactl) as an intger formulated by 'QCMD' macro (see /usr/include/linux/quota.h) in which we have to specify the quota type also .. i was not using the QCMD macro .. that's it .. I AM REALLY SORRY FOR ASKING SUCH A SILLY QUESTION .. rgds, Pankaj --- pankaj chauhan <chauhan_ait@yahoo.co.in> wrote: > hi sir, > > i have a small problem in enabling quotas on my > system, following is the description of what i did : > > 1. edited /etc/fstab and given usrquota and grpquota > for root fs. > > 2. made aquota.user and aquota.grp with > 'quotacheck'. > > 3. used 'edquota' to manupulate quotas for a user > say > 'pankaj'. > > This is working fine .. > > but i do'nt want to use edquota (according to my > requirement) .. i tried to use 'quotactl' to > manupulate quotas , things related to quotas in my > code are : > > ------ > #include<linux/quota.h> > > main() > { > strcut mem_dqblk quota; > > if(quotactl(Q_GETQUOTA,"/dev/hda7",502,"a)<0) > { > // here it is giving errno = 22 ( EINVAL) > exit(0); > } > ..... > } > > ---- > > also note : > 1. /dev/hda7 is device on which i have my root fs. > 2. 502 is valid user. > 3. kernel is compiled with CONFIG_QUOTA set . > > so , quotactl is returning with err code 22 > (EINVAL).. > plz tell me why it is failing .. > > OR is there is any method by which i can give > alternate file (in which we have quotas defined for > users) in 'edquota' , i want that edquota shud read > quota limits from my file.. > > > PLZ reply soon .. > > Rgds, > Pankaj > > > > ________________________________________________________________________ > Yahoo! India Matrimony: Find your partner online. > http://yahoo.shaadi.com/india-matrimony/ > > -- > Kernelnewbies: Help each other learn about the Linux > kernel. > Archive: > http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > ________________________________________________________________________ Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/