]> git.pld-linux.org Git - packages/bsd-finger.git/commitdiff
42c138546a26bb814f4f45c0e544985a bsd-finger-maint.patch
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Aug 1999 14:06:04 +0000 (14:06 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
27374b4d100b3cc5c2e4e053b2e42372  bsd-finger-pts.patch
de9f4ac65c57ba647996640ad1f1c52e  bsd-finger-timeout.patch
68fbc5888e457ab5188c50890090bae6  pidentd-3.1a14.tar.gz

Changed files:
    bsd-finger-pts.patch -> 1.1

bsd-finger-pts.patch [new file with mode: 0644]

diff --git a/bsd-finger-pts.patch b/bsd-finger-pts.patch
new file mode 100644 (file)
index 0000000..7bae535
--- /dev/null
@@ -0,0 +1,51 @@
+--- bsd-finger-0.10/finger/util.c.pts  Thu Apr  8 13:49:11 1999
++++ bsd-finger-0.10/finger/util.c      Thu Apr  8 13:51:49 1999
+@@ -68,9 +68,15 @@
+               return;
+       snprintf(tbuf, TBUFLEN, "%s/%s", _PATH_DEV, w->tty);
+       if (stat(tbuf, &sb) < 0) {
++          switch(errno) {
++          case ENOENT:
++              break;
++          default:
+               (void)fprintf(stderr,
+                   "finger: %s: %s\n", tbuf, strerror(errno));
+-              return;
++              break;
++          }
++          return;
+       }
+       w->idletime = now < sb.st_atime ? 0 : now - sb.st_atime;
+--- bsd-finger-0.10/finger/sprint.c.pts        Thu Apr  8 14:20:51 1999
++++ bsd-finger-0.10/finger/sprint.c    Thu Apr  8 14:38:32 1999
+@@ -90,7 +90,7 @@
+       if (maxlname + maxrname < space-2) { maxlname++; maxrname++; }
+       (void)printf("%-*s %-*s %s\n", maxlname, "Login", maxrname,
+-          "Name", "Tty  Idle  Login Time   Office     Office Phone");
++          "Name", " Tty   Idle  Login Time   Office     Office Phone");
+       for (cnt = 0; cnt < entries; ++cnt) {
+               pn = list[cnt];
+               for (w = pn->whead; w != NULL; w = w->next) {
+@@ -103,12 +103,14 @@
+                       }
+                       (void)putchar(w->info == LOGGEDIN && !w->writable ?
+                           '*' : ' ');
+-                      if (*w->tty)
+-                              (void)printf("%-2.2s ",
+-                                  w->tty[0] != 't' || w->tty[1] != 't' ||
+-                                  w->tty[2] != 'y' ? w->tty : w->tty + 3);
+-                      else
+-                              (void)printf("   ");
++                      if (*w->tty) {
++                              char *t = w->tty;
++                              if ((t[0] == 't' && t[1] == 't' && t[2] == 'y')
++                               || (t[0] == 'p' && t[1] == 't' && t[2] == 's'))
++                                      t += 3;
++                              (void)printf("%-4.4s ", t);
++                      } else
++                              (void)printf("     ");
+                       if (w->info == LOGGEDIN) {
+                               stimeprint(w);
+                               (void)printf("  ");
This page took 0.051045 seconds and 4 git commands to generate.