From 39ddd0a520bc2be31c34f43c9f2ec38a397cfa5c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 1 Aug 2007 11:18:56 +0000 Subject: 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) --- source3/utils/status.c | 21 +++++++++++++++++---- 1 file 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