]> mj.ucw.cz Git - nwho.git/blobdiff - nwho.c
Killed another reference to <asm/types.h>
[nwho.git] / nwho.c
diff --git a/nwho.c b/nwho.c
index d7e1f196f5dbe5273d168d5e2586cf2501796f3f..7edcd0cd521caaa07658f353a1cfe137ad550ecd 100644 (file)
--- a/nwho.c
+++ b/nwho.c
@@ -1,10 +1,7 @@
 /*
  *     The Remote User Information Lister
  *
- *     (c) 1997--2002 Martin Mares <mj@ucw.cz>
- *
- *     This software may be freely distributed and used according to the terms
- *     of the GNU General Public License. See file COPYING in any of the GNU packages.
+ *     (c) 1997--2010 Martin Mares <mj@ucw.cz>
  */
 
 #include <stdio.h>
@@ -15,7 +12,6 @@
 #include <dirent.h>
 #include <time.h>
 #include <netinet/in.h>
-#include <asm/types.h>
 
 #include "net.h"
 
@@ -49,7 +45,7 @@ puttime(int s)
 }
 
 static void
-show_uptime(char *name, struct rywho_pkt *p)
+show_uptime(char *name, struct nwho_pkt *p)
 {
   int i;
 
@@ -70,7 +66,7 @@ show_uptime(char *name, struct rywho_pkt *p)
 }
 
 static void
-show_users(char *name, struct rywho_pkt *p)
+show_users(char *name, struct nwho_pkt *p)
 {
   int u;
   int m = ntohl(p->num_users);
@@ -96,7 +92,7 @@ scan(void)
 {
   DIR *d;
   struct dirent *e;
-  struct rywho_pkt pkt;
+  struct nwho_pkt pkt;
   int fd, r;
   int is = 0;
 
@@ -122,9 +118,9 @@ scan(void)
          }
        r = read(fd, &pkt, sizeof(pkt));
        close(fd);
-       if (r < sizeof(struct rywho_pkt) - MAX_USERS*sizeof(struct userinfo)
+       if (r < sizeof(struct nwho_pkt) - MAX_USERS*sizeof(struct userinfo)
            || pkt.magic != htonl(NWHO_MAGIC)
-           || r != sizeof(struct rywho_pkt) - (MAX_USERS - ntohl(pkt.num_users))*sizeof(struct userinfo))
+           || r != sizeof(struct nwho_pkt) - (MAX_USERS - ntohl(pkt.num_users))*sizeof(struct userinfo))
          {
            fprintf(stderr, "%s: Malformed record\n", e->d_name);
            continue;