static int cp_aclstat(struct inode * inode, struct acl_entry * acl_statbuf, int len) { struct acl_entry tmp[MAX_ACL_LEN]; acl_iterator i; int j=0; if(len < 0 || len < acl_getsize(&inode->vfs_acl)) /*si es negativo o si no alcanza*/ return -EINVAL; if(len) /*si no es cero*/ { //EL EJEMPLO acl_for_each(&inode->vfs_acl,i){ if(j>len) break; tmp[j++]=acl_getentry(&inode->vfs_acl,i); /*\bug deberiamos borrar los bits que no le interesan al usr!*/ } //FIN EJEMPLO if(copy_to_user(acl_statbuf,tmp,j * sizeof(struct acl_entry))) return -EFAULT; } return acl_getsize(&inode->vfs_acl); }