1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbstatus: add file_id information to byte-range locks in json output

Adds a dictionary with file_id information (devid, inode and extid) for
each byte-range locked file.

Signed-off-by: Jule Anger <janger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jule Anger 2022-08-01 11:15:44 +02:00
parent c47d9d28f1
commit fed1569f03
4 changed files with 8 additions and 0 deletions

View File

@ -412,6 +412,7 @@ static void print_brl(struct file_id id,
} else {
print_brl_json(state,
pid,
id,
desc,
lock_flav,
(intmax_t)start,

View File

@ -1035,6 +1035,7 @@ failure:
int print_brl_json(struct traverse_state *state,
const struct server_id server_id,
struct file_id fid,
const char *type,
enum brl_flavour flavour,
intmax_t start,
@ -1070,6 +1071,10 @@ int print_brl_json(struct traverse_state *state,
goto failure;
}
result = add_fileid_to_json(&file_json, fid);
if (result < 0) {
goto failure;
}
result = json_add_string(&file_json, "file_name", filename);
if (result < 0) {
goto failure;

View File

@ -55,6 +55,7 @@ int print_share_mode_json(struct traverse_state *state,
int print_brl_json(struct traverse_state *state,
const struct server_id server_id,
struct file_id fid,
const char *type,
enum brl_flavour flavour,
intmax_t start,

View File

@ -72,6 +72,7 @@ int print_share_mode_json(struct traverse_state *state,
int print_brl_json(struct traverse_state *state,
const struct server_id server_id,
struct file_id fid,
const char *type,
enum brl_flavour flavour,
intmax_t start,