libsmb: Introduce type-safe struct cli_smb2_create_flags
authorVolker Lendecke <vl@samba.org>
Wed, 12 Apr 2023 13:31:03 +0000 (15:31 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 18 Apr 2023 14:58:36 +0000 (14:58 +0000)
commit1e738cb061c939e23663d6eb007baf4eea6d8fda
tree0eaebb93cfa72e3cef3805638309f221d814143b
parent526f381f413d1cb5cde93b9542034f5ebfcfcc10
libsmb: Introduce type-safe struct cli_smb2_create_flags

This makes it clearer what to pass into the create_flags argument to
cli_smb2_create_fnum(). There was already confusion in
source3/torture/test_smb2.c: It passed in
SMB2_OPLOCK_LEVEL_NONE (which was okay because it #defines to 0), but
it should have been a straight 0, for example
SMB2_OPLOCK_LEVEL_EXCLUSIVE would have been wrong.

This way adding other flags (.nofollow comes to mind) will be much
easier to handle.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
examples/fuse/clifuse.c
source3/libsmb/cli_smb2_fnum.c
source3/libsmb/cli_smb2_fnum.h
source3/libsmb/clifile.c
source3/libsmb/pylibsmb.c
source3/torture/test_smb2.c