~ubuntu-branches/debian/sid/net-tools/sid

« back to all changes in this revision

Viewing changes to debian/patches/netstat.c-local_changes.patch

  • Committer: Package Import Robot
  • Author(s): Martín Ferrari
  • Date: 2015-09-07 01:54:07 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150907015407-v2tfsgxayjd3iq4i
Tags: 1.60+git20150829.73cef8a-1
* After 14 years without an upstream release, I am producing a new package
  based on today's upstream repository.
  Closes: #391495, #486448, #323261, #260587, #545328, #511395.
* Remove many patches now merged upstream, delete unmaintainable and
  undocumented local changes, and update the rest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Undocumented patches found in diff.gz.
2
 
 
3
 
Index: net-tools/netstat.c
4
 
===================================================================
5
 
--- net-tools.orig/netstat.c
6
 
+++ net-tools/netstat.c
7
 
@@ -387,6 +387,10 @@ static void prg_cache_load(void)
8
 
 #ifdef DIRENT_HAVE_D_TYPE_WORKS
9
 
            if (direfd->d_type!=DT_LNK) 
10
 
                continue;
11
 
+#else
12
 
+           /* Skip . and .. */
13
 
+           if (!isdigit(direfd->d_name[0]))
14
 
+               continue;
15
 
 #endif
16
 
            if (procfdlen+1+strlen(direfd->d_name)+1>sizeof(line)) 
17
 
                continue;
18
 
@@ -541,9 +545,9 @@ static void finish_this_one(int uid, uns
19
 
        printf("%-10lu ",inode);
20
 
     }
21
 
     if (flag_prg)
22
 
-       printf("%-" PROGNAME_WIDTHs "s",prg_cache_get(inode));
23
 
+       printf(" %-16s",prg_cache_get(inode));
24
 
     if (flag_opt)
25
 
-       printf("%s", timers);
26
 
+       printf(" %s", timers);
27
 
     putchar('\n');
28
 
 }
29
 
 
30
 
@@ -1250,7 +1254,7 @@ static int unix_info(void)
31
 
        printf(_("(w/o servers)"));
32
 
     }
33
 
 
34
 
-    printf(_("\nProto RefCnt Flags       Type       State         I-Node"));
35
 
+    printf(_("\nProto RefCnt Flags       Type       State         I-Node  "));
36
 
     print_progname_banner();
37
 
     printf(_(" Path\n"));      /* xxx */
38
 
 
39
 
@@ -1813,10 +1817,11 @@ int main
40
 
            }
41
 
            printf(_("\nProto Recv-Q Send-Q Local Address           Foreign Address         State      "));     /* xxx */
42
 
            if (flag_exp > 1)
43
 
-               printf(_(" User       Inode     "));
44
 
-           print_progname_banner();
45
 
+               printf(_(" User       Inode      "));
46
 
+            if (flag_prg)
47
 
+                printf(_(" PID/Program name"));
48
 
            if (flag_opt)
49
 
-               printf(_(" Timer"));    /* xxx */
50
 
+               printf(_(" Timer"));
51
 
            printf("\n");
52
 
 #else
53
 
            if (flag_arg) {
54
 
@@ -1917,6 +1922,7 @@ int main
55
 
            }
56
 
 #endif
57
 
        }
58
 
+                   
59
 
        if (!flag_cnt || i)
60
 
            break;
61
 
        sleep(1);