lxd/storage/quota/projectquota.go
func SetProjectQuota(path string, id uint32, bytes int64) error {
	// Get the backing device
	devPath, err := devForPath(path)
	if err != nil {
		return err
	}

	// Call quotactl through CGo
	cDevPath := C.CString(devPath)
	defer C.free(unsafe.Pointer(cDevPath))

	if C.quota_set(cDevPath, C.uint32_t(id), C.int(bytes/1024)) != 0 {
		return fmt.Errorf("Failed to set project quota for id '%d' on '%s'", id, path)
	}

	return nil
}
func SetProjectQuota(path string, id uint32, bytes int64) error {
	// Get the backing device
	devPath, err := devForPath(path)
	if err != nil {
		return err
	}

	// Call quotactl through CGo
	cDevPath := C.CString(devPath)
	defer C.free(unsafe.Pointer(cDevPath))

	if C.quota_set(cDevPath, C.uint32_t(id), C.int(bytes/1024)) != 0 {
		return fmt.Errorf("Failed to set project quota for id '%d' on '%s'", id, path)
	}

	return nil
}
func SetProjectQuota ( path string , id uint32 , bytes int64 ) error { // Get the backing device devPath , err := devForPath ( path ) if err != nil { return err } // Call quotactl through CGo cDevPath := C . CString ( devPath ) defer C . free ( unsafe . Pointer ( cDevPath ) ) if C . quota_set ( cDevPath , C . uint32_t ( id ) , C . int ( bytes / 1024 ) ) != 0 { return fmt . Errorf ( " " , id , path ) } return nil }
// SetProjectQuota sets the quota on the project id
SetProjectQuota sets the quota on the project id