[BACK]Return to modstat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / modstat

Diff for /src/usr.bin/modstat/Attic/modstat.c between version 1.21 and 1.22

version 1.21, 2003/06/10 22:20:48 version 1.22, 2005/07/04 01:54:10
Line 114 
Line 114 
         char *modname = NULL;          char *modname = NULL;
         char *endptr;          char *endptr;
         int devfd;          int devfd;
           gid_t gid;
   
         while ((c = getopt(argc, argv, "i:n:")) != -1) {          while ((c = getopt(argc, argv, "i:n:")) != -1) {
                 switch (c) {                  switch (c) {
Line 143 
Line 144 
         if ((devfd = open(_PATH_LKM, O_RDONLY)) == -1)          if ((devfd = open(_PATH_LKM, O_RDONLY)) == -1)
                 err(2, "%s", _PATH_LKM);                  err(2, "%s", _PATH_LKM);
   
         setegid(getgid());          gid = getgid();
         setgid(getgid());          if (setresgid(gid, gid, gid) == -1)
                   err(1, "setresgid");
   
         printf("Type     Id Off %-*s Size %-*s Rev Module Name\n",          printf("Type     Id Off %-*s Size %-*s Rev Module Name\n",
             POINTERSIZE, "Loadaddr", POINTERSIZE, "Info");              POINTERSIZE, "Loadaddr", POINTERSIZE, "Info");

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22