[PATCH 2/6] torture: test FSCTL_SET_SPARSE
Jeremy Allison
jra at samba.org
Wed Aug 27 17:42:52 MDT 2014
On Wed, Aug 27, 2014 at 03:41:58PM +0200, David Disseldorp wrote:
> Check that the FILE_ATTRIBUTE_SPARSE is set following FSCTL_SET_SPARSE.
> Also confirm that adding the attribute on create doesn't carry through
> to subsequent SMB2_GETINFO_FILE requests.
> +static NTSTATUS test_sparse_get(struct torture_context *torture,
> + TALLOC_CTX *mem_ctx,
> + struct smb2_tree *tree,
> + struct smb2_handle fh,
> + bool *_is_sparse)
> +{
> + union smb_fileinfo io;
> + NTSTATUS status;
> +
> + ZERO_STRUCT(io);
> + io.generic.level = RAW_FILEINFO_BASIC_INFORMATION;
> + io.generic.in.file.handle = fh;
> + status = smb2_getinfo_file(tree, mem_ctx, &io);
> + if (!NT_STATUS_IS_OK(status)) {
> + return status;
> + }
> + *_is_sparse = !!(io.basic_info.out.attrib & FILE_ATTRIBUTE_SPARSE);
This line:
^^
||
is weird :-). Double ! Typo ?
Jeremy.
More information about the samba-technical
mailing list