Varie correzioni, completata revisione capitolo sull'I/O su file
[gapil.git] / listati / set_block_quota.c
1 PyObject *set_block_quota(int who, int id, const char *dev, int soft, int hard) 
2 {
3   struct dqblk dq;
4   
5   dq.dqb_bsoftlimit = soft;
6   dq.dqb_bhardlimit = hard;
7   dq.dqb_valid = QIF_BLIMITS;
8   
9   if (!quotactl(QCMD(Q_SETQUOTA,who), dev, id, (caddr_t) &dq)) {
10         Py_RETURN_NONE;
11   } else {
12         PyErr_SetFromErrno(PyExc_OSError);
13         return NULL;
14   }    
15 }