diff options
author | Tim Prouty <tprouty@samba.org> | 2009-07-08 16:22:44 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-07-08 21:36:04 -0700 |
commit | 3a7d372e2eb5ab00986aafe69ac715a68faa077f (patch) | |
tree | 2fba0fae51888d6792f8eae16fde5d2d547f5066 /source3/utils | |
parent | 83e5ac569577566fa171b8f4288e26e5129015ab (diff) | |
download | samba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.tar.gz samba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.tar.bz2 samba-3a7d372e2eb5ab00986aafe69ac715a68faa077f.zip |
s3: Change the share_mode_lock struct to store a base_name and stream_name
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/status.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c index cbf0dcb2b5..fa7d1eba2b 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -191,7 +191,7 @@ static void print_brl(struct file_id id, }; const char *desc="X"; const char *sharepath = ""; - const char *fname = ""; + char *fname = NULL; struct share_mode_lock *share_mode; if (count==0) { @@ -201,10 +201,19 @@ static void print_brl(struct file_id id, } count++; - share_mode = fetch_share_mode_unlocked(NULL, id, "__unspecified__", "__unspecified__"); + share_mode = fetch_share_mode_unlocked(NULL, id); if (share_mode) { - sharepath = share_mode->servicepath; - fname = share_mode->filename; + bool has_stream = share_mode->stream_name != NULL; + + fname = talloc_asprintf(NULL, "%s%s%s", share_mode->base_name, + has_stream ? ":" : "", + has_stream ? share_mode->stream_name : + ""); + } else { + fname = talloc_strdup(NULL, ""); + if (fname == NULL) { + return; + } } for (i=0;i<ARRAY_SIZE(lock_types);i++) { @@ -219,6 +228,7 @@ static void print_brl(struct file_id id, (double)start, (double)size, sharepath, fname); + TALLOC_FREE(fname); TALLOC_FREE(share_mode); } |