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

Diff for /src/usr.bin/ipcs/ipcs.c between version 1.23 and 1.24

version 1.23, 2008/06/26 05:42:21 version 1.24, 2011/04/06 11:36:26
Line 448 
Line 448 
         mib[0] = CTL_KERN;          mib[0] = CTL_KERN;
         mib[1] = KERN_SYSVMSG;          mib[1] = KERN_SYSVMSG;
         len = sizeof(valid);          len = sizeof(valid);
         if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {          if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVMSG)");                  warn("sysctl(KERN_SYSVMSG)");
                 return;                  return;
         }          }
Line 465 
Line 465 
                 /* totals only */                  /* totals only */
                 len = sizeof(struct msginfo);                  len = sizeof(struct msginfo);
         } else {          } else {
                 if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {                  if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
                         warn("sysctl(KERN_SYSVIPC_MSG_INFO)");                          warn("sysctl(KERN_SYSVIPC_MSG_INFO)");
                         return;                          return;
                 }                  }
Line 474 
Line 474 
         if ((buf = malloc(len)) == NULL)          if ((buf = malloc(len)) == NULL)
                 err(1, "malloc");                  err(1, "malloc");
         msgsi = (struct msg_sysctl_info *)buf;          msgsi = (struct msg_sysctl_info *)buf;
         if (sysctl(mib, 3, msgsi, &len, NULL, NULL) < 0) {          if (sysctl(mib, 3, msgsi, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVIPC_MSG_INFO)");                  warn("sysctl(KERN_SYSVIPC_MSG_INFO)");
                 return;                  return;
         }          }
Line 519 
Line 519 
         mib[0] = CTL_KERN;          mib[0] = CTL_KERN;
         mib[1] = KERN_SYSVSHM;          mib[1] = KERN_SYSVSHM;
         len = sizeof(valid);          len = sizeof(valid);
         if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {          if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVSHM)");                  warn("sysctl(KERN_SYSVSHM)");
                 return;                  return;
         }          }
Line 537 
Line 537 
                 /* totals only */                  /* totals only */
                 len = sizeof(struct shminfo);                  len = sizeof(struct shminfo);
         } else {          } else {
                 if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {                  if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
                         warn("sysctl(KERN_SYSVIPC_SHM_INFO)");                          warn("sysctl(KERN_SYSVIPC_SHM_INFO)");
                         return;                          return;
                 }                  }
Line 546 
Line 546 
         if ((buf = malloc(len)) == NULL)          if ((buf = malloc(len)) == NULL)
                 err(1, "malloc");                  err(1, "malloc");
         shmsi = (struct shm_sysctl_info *)buf;          shmsi = (struct shm_sysctl_info *)buf;
         if (sysctl(mib, 3, shmsi, &len, NULL, NULL) < 0) {          if (sysctl(mib, 3, shmsi, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVIPC_SHM_INFO)");                  warn("sysctl(KERN_SYSVIPC_SHM_INFO)");
                 return;                  return;
         }          }
Line 590 
Line 590 
         mib[0] = CTL_KERN;          mib[0] = CTL_KERN;
         mib[1] = KERN_SYSVSEM;          mib[1] = KERN_SYSVSEM;
         len = sizeof(valid);          len = sizeof(valid);
         if (sysctl(mib, 2, &valid, &len, NULL, NULL) < 0) {          if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVSEM)");                  warn("sysctl(KERN_SYSVSEM)");
                 return;                  return;
         }          }
Line 608 
Line 608 
                 /* totals only */                  /* totals only */
                 len = sizeof(struct seminfo);                  len = sizeof(struct seminfo);
         } else {          } else {
                 if (sysctl(mib, 3, NULL, &len, NULL, NULL) < 0) {                  if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) {
                         warn("sysctl(KERN_SYSVIPC_SEM_INFO)");                          warn("sysctl(KERN_SYSVIPC_SEM_INFO)");
                         return;                          return;
                 }                  }
Line 617 
Line 617 
         if ((buf = malloc(len)) == NULL)          if ((buf = malloc(len)) == NULL)
                 err(1, "malloc");                  err(1, "malloc");
         semsi = (struct sem_sysctl_info *)buf;          semsi = (struct sem_sysctl_info *)buf;
         if (sysctl(mib, 3, semsi, &len, NULL, NULL) < 0) {          if (sysctl(mib, 3, semsi, &len, NULL, 0) < 0) {
                 warn("sysctl(KERN_SYSVIPC_SEM_INFO)");                  warn("sysctl(KERN_SYSVIPC_SEM_INFO)");
                 return;                  return;
         }          }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24