Print this page
5218 posix definition of NULL
correct unistd.h and iso/stddef_iso.h
update gate source affected

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/svcs/svcs.c
          +++ new/usr/src/cmd/svc/svcs/svcs.c
↓ open down ↓ 545 lines elided ↑ open up ↑
 546  546                  *buf = '\0';
 547  547  }
 548  548  
 549  549  static int
 550  550  get_restarter_time_prop(scf_instance_t *inst, const char *pname,
 551  551      struct timeval *tvp, int ok_if_empty)
 552  552  {
 553  553          int r;
 554  554  
 555  555          r = inst_get_single_val(inst, SCF_PG_RESTARTER, pname, SCF_TYPE_TIME,
 556      -            tvp, NULL, ok_if_empty ? EMPTY_OK : 0, 0, 1);
      556 +            tvp, 0, ok_if_empty ? EMPTY_OK : 0, 0, 1);
 557  557  
 558  558          return (r == 0 ? 0 : -1);
 559  559  }
 560  560  
 561  561  static int
 562  562  get_restarter_count_prop(scf_instance_t *inst, const char *pname, uint64_t *cp,
 563  563      uint_t flags)
 564  564  {
 565  565          return (inst_get_single_val(inst, SCF_PG_RESTARTER, pname,
 566  566              SCF_TYPE_COUNT, cp, 0, flags, 0, 1));
↓ open down ↓ 1076 lines elided ↑ open up ↑
1643 1643          struct tm *tm;
1644 1644          char st_buf[STIME_COLUMN_WIDTH + 1];
1645 1645          size_t newsize = (*buf ? strlen(*buf) : 0) + STIME_COLUMN_WIDTH + 2;
1646 1646          char *newbuf = safe_malloc(newsize);
1647 1647  
1648 1648          if (wip->pg == NULL) {
1649 1649                  r = get_restarter_time_prop(wip->inst,
1650 1650                      SCF_PROPERTY_STATE_TIMESTAMP, &tv, 0);
1651 1651          } else {
1652 1652                  r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1653      -                    SCF_TYPE_TIME, &tv, NULL, 0);
     1653 +                    SCF_TYPE_TIME, &tv, 0, 0);
1654 1654          }
1655 1655  
1656 1656          if (r != 0) {
1657 1657                  /*
1658 1658                   * There's something amiss with our service
1659 1659                   * so we'll print a '-' for STIME.
1660 1660                   */
1661 1661                  (void) snprintf(newbuf, newsize, "%s%-*s", *buf ? *buf : "",
1662 1662                      STIME_COLUMN_WIDTH + 1, "-");
1663 1663          } else {
↓ open down ↓ 31 lines elided ↑ open up ↑
1695 1695  sortkey_stime(char *buf, int reverse, scf_walkinfo_t *wip)
1696 1696  {
1697 1697          struct timeval tv;
1698 1698          int r;
1699 1699  
1700 1700          if (wip->pg == NULL)
1701 1701                  r = get_restarter_time_prop(wip->inst,
1702 1702                      SCF_PROPERTY_STATE_TIMESTAMP, &tv, 0);
1703 1703          else
1704 1704                  r = pg_get_single_val(wip->pg, SCF_PROPERTY_STATE_TIMESTAMP,
1705      -                    SCF_TYPE_TIME, &tv, NULL, 0);
     1705 +                    SCF_TYPE_TIME, &tv, 0, 0);
1706 1706  
1707 1707          if (r == 0) {
1708 1708                  int64_t sec;
1709 1709                  int32_t us;
1710 1710  
1711 1711                  /* Stick it straight into the buffer. */
1712 1712                  sec = tv.tv_sec;
1713 1713                  us = tv.tv_usec;
1714 1714  
1715 1715                  sec = BE_64(sec);
↓ open down ↓ 791 lines elided ↑ open up ↑
2507 2507                      buf, max_scf_fmri_length + 1, 0) == 0)
2508 2508                          (void) printf(fmt, DETAILED_WIDTH, gettext("state"),
2509 2509                              buf);
2510 2510  
2511 2511                  if (pg_get_single_val(rpg, scf_property_next_state,
2512 2512                      SCF_TYPE_ASTRING, buf, max_scf_fmri_length + 1, 0) == 0)
2513 2513                          (void) printf(fmt, DETAILED_WIDTH,
2514 2514                              gettext("next_state"), buf);
2515 2515  
2516 2516                  if (pg_get_single_val(rpg, SCF_PROPERTY_STATE_TIMESTAMP,
2517      -                    SCF_TYPE_TIME, &tv, NULL, 0) == 0) {
     2517 +                    SCF_TYPE_TIME, &tv, 0, 0) == 0) {
2518 2518                          stime = tv.tv_sec;
2519 2519                          tmp = localtime(&stime);
2520 2520                          for (tbsz = 50; ; tbsz *= 2) {
2521 2521                                  timebuf = safe_malloc(tbsz);
2522 2522                                  if (strftime(timebuf, tbsz, NULL, tmp) != 0)
2523 2523                                          break;
2524 2524                                  free(timebuf);
2525 2525                          }
2526 2526                          (void) printf(fmt, DETAILED_WIDTH,
2527 2527                              gettext("state_time"),
↓ open down ↓ 1401 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX