diff options
author | Ralph Boehme <slow@samba.org> | 2015-10-11 09:38:18 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-10-12 22:13:19 +0200 |
commit | cd0c2a5eca43cea76491ae0d820414287c234c1a (patch) | |
tree | dcafa8f35f23b3765a00d9fff3fcb2a3f3043e3b /source3/locking | |
parent | d643aafe59738890cb8b71e2e865c56ea1fe6539 (diff) | |
download | samba-cd0c2a5eca43cea76491ae0d820414287c234c1a.tar.gz |
s3:smbstatus: add stream name to share_entry_forall()
Add stream name argument to share_entry_forall machinery so smbstatus
can print the stream name of a file.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11550
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/proto.h | 3 | ||||
-rw-r--r-- | source3/locking/share_mode_lock.c | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source3/locking/proto.h b/source3/locking/proto.h index 652ec2a4c66..8ff1c7cd632 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -202,7 +202,8 @@ int share_mode_forall(int (*fn)(struct file_id fid, const struct share_mode_data *data, void *private_data), void *private_data); -int share_entry_forall(int (*fn)(const struct share_mode_entry *, const char *, +int share_entry_forall(int (*fn)(const struct share_mode_entry *, + const char *, const char *, const char *, void *), void *private_data); bool share_mode_cleanup_disconnected(struct file_id id, diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 5eedcc5fbe4..6273aecd84a 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -728,7 +728,9 @@ int share_mode_forall(int (*fn)(struct file_id fid, struct share_entry_forall_state { int (*fn)(const struct share_mode_entry *e, - const char *service_path, const char *base_name, + const char *service_path, + const char *base_name, + const char *stream_name, void *private_data); void *private_data; }; @@ -744,7 +746,9 @@ static int share_entry_traverse_fn(struct file_id fid, int ret; ret = state->fn(&data->share_modes[i], - data->servicepath, data->base_name, + data->servicepath, + data->base_name, + data->stream_name, state->private_data); if (ret != 0) { return ret; @@ -760,7 +764,8 @@ static int share_entry_traverse_fn(struct file_id fid, ********************************************************************/ int share_entry_forall(int (*fn)(const struct share_mode_entry *, - const char *, const char *, void *), + const char *, const char *, + const char *, void *), void *private_data) { struct share_entry_forall_state state = { |