improved error message in case the lock list is truncated
authorAndrew Tridgell <tridge@samba.org>
Wed, 22 Dec 1999 01:36:27 +0000 (01:36 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 22 Dec 1999 01:36:27 +0000 (01:36 +0000)
(This used to be commit f4ecc5a8e39ee69c59123b7b3ffbd081f69824ca)

source3/utils/status.c

index 35f91ef2affa91febfba495427a67422abc94269..51118914922038ed131f1a32e02587f93288f559 100644 (file)
@@ -324,13 +324,20 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf)
        printf("\n");
 
        if (!shares_only) {
+               int ret;
+
                if (!locking_init(1)) {
                        printf("Can't initialise shared memory - exiting\n");
                        exit(1);
                }
                
-               if (share_mode_forall(print_share_mode) <= 0)
+               ret = share_mode_forall(print_share_mode);
+
+               if (ret == 0) {
                        printf("No locked files\n");
+               } else if (ret == -1) {
+                       printf("locked file list truncated\n");
+               }
                
                printf("\n");