diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-08-01 11:18:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:08 -0500 |
commit | 39ddd0a520bc2be31c34f43c9f2ec38a397cfa5c (patch) | |
tree | 07aa4a3be7cb039d7dd8d93896f3957bee385241 /source3/utils | |
parent | ebdfd345483328b54e09fb838b6cea13f31c27d5 (diff) | |
download | samba-39ddd0a520bc2be31c34f43c9f2ec38a397cfa5c.tar.gz samba-39ddd0a520bc2be31c34f43c9f2ec38a397cfa5c.tar.bz2 samba-39ddd0a520bc2be31c34f43c9f2ec38a397cfa5c.zip |
r24115: try to get the file name and share patch for printing
brlocks from the share_mode db, as the same fileid
is used.
metze
(This used to be commit 8cccf470cbce87618753bc205a0c9cac1edf4d9c)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/status.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c index ca09dfa28d..8ad9b21fe0 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -190,23 +190,36 @@ static void print_brl(struct file_id id, { UNLOCK_LOCK, "U" } }; const char *desc="X"; + const char *sharepath = ""; + const char *fname = ""; + struct share_mode_lock *share_mode; + if (count==0) { d_printf("Byte range locks:\n"); - d_printf(" Pid dev:inode R/W start size\n"); - d_printf("------------------------------------------------\n"); + d_printf("Pid dev:inode R/W start size SharePath Name\n"); + d_printf("--------------------------------------------------------------------------------\n"); } count++; + share_mode = fetch_share_mode_unlocked(NULL, id, "__unspecified__", "__unspecified__"); + if (share_mode) { + sharepath = share_mode->servicepath; + fname = share_mode->filename; + } + for (i=0;i<ARRAY_SIZE(lock_types);i++) { if (lock_type == lock_types[i].lock_type) { desc = lock_types[i].desc; } } - d_printf("%8s %s %2s %9.0f %9.0f\n", + d_printf("%-10s %-15s %-4s %-9.0f %-9.0f %-24s %-24s\n", procid_str_static(&pid), file_id_static_string(&id), desc, - (double)start, (double)size); + (double)start, (double)size, + sharepath, fname); + + talloc_free(share_mode); } static int traverse_fn1(struct db_record *rec, |