]> granicus.if.org Git - psmisc/commitdiff
sync to new server
authorCraig Small <csmall@users.sourceforge.net>
Thu, 25 May 2006 00:03:20 +0000 (00:03 +0000)
committerCraig Small <csmall@users.sourceforge.net>
Thu, 25 May 2006 00:03:20 +0000 (00:03 +0000)
ChangeLog
src/fuser.c

index a9d46bb9c22d30f41d59d63eaa1d72311476db38..25eb5273e7a5eb3068c6e8caffca43408b2f5b49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 Changes in 22.3
 ================
+2006-04-05 Karel Zak
+       * fuser return code set correcly in silent mode
+       * fuser -l doesnt complain but list signal names only
+
 2006-03-24 Craig Small
        * Updated Bulgarian and Italian PO files
        * Added Japanese and Hungarian PO files
index d7dc9e585c8e50e72b6d580c2c614ff6ec392ba7..93cd39843d26de18c62d07cfe6d2fddf9c72b87d 100644 (file)
@@ -695,7 +695,7 @@ int main(int argc, char *argv[])
                                        break;
                                case 'l':
                                        list_signals();
-                                       break;
+                                       return 0;
                                case 'm':
                                        opts |= OPT_MOUNTS;
                                        break;
@@ -849,7 +849,9 @@ static int print_matches(struct names *names_head, const opt_type opts, const in
        int have_match = 0;
        
        for (nptr = names_head; nptr != NULL ; nptr = nptr->next) {
-               if (! (opts & OPT_SILENT)) { /* We're not silent */
+               if (opts & OPT_SILENT) {
+                       have_match = nptr->matched_procs ? 1 : have_match;
+               } else { /* We're not silent */
                        if (nptr->matched_procs != NULL || opts & OPT_ALLFILES) {
                                if (head == 0 && opts & OPT_VERBOSE) {
                                        fprintf(stderr, _("\n%*s USER        PID ACCESS COMMAND\n"),
@@ -919,7 +921,7 @@ static int print_matches(struct names *names_head, const opt_type opts, const in
                                putc('\n', stderr);
                } /* be silent */
                if (opts & OPT_KILL)
-               kill_matched_proc(nptr->matched_procs,  opts, sig_number);
+                       kill_matched_proc(nptr->matched_procs,  opts, sig_number);
 
        } /* next name */
        return (have_match==1?0:1);