{
char *out;
const char *key;
- struct aa_profile *profile;
+ struct aa_profile *profile, *curr;
struct aa_data *data;
u32 bytes, blocks;
__le32 outle32;
if (buf_len < sizeof(bytes) + sizeof(blocks))
return -EINVAL; /* not enough space */
- profile = aa_current_profile();
+ curr = aa_current_profile();
+ profile = aa_fqlookupn_profile(curr, query, strnlen(query, query_len));
+ if (!profile)
+ return -ENOENT;
/* We are going to leave space for two numbers. The first is the total
* number of bytes we are writing after the first number. This is so
blocks++;
}
}
+ aa_put_profile(profile);
outle32 = __cpu_to_le32(out - buf - sizeof(bytes));
memcpy(buf, &outle32, sizeof(outle32));