Project

General

Profile

Actions

Bug #14264

closed

kstat_lookup and friends should take const strings

Added by Rich Lowe 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Right now kstat_lookup takes char* which means passing constants requires casts and compiler grumbles.
The parameters are all obviously const and should be constified.

Actions #1

Updated by Robert Mustacchi about 2 months ago

  • Assignee set to Robert Mustacchi
Actions #2

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 1829
Actions #3

Updated by Robert Mustacchi about 1 month ago

To test this I ran a kstat -p before and after this change. I then opened the two files up in vimdiff. While there were a few changes to things like snaptime, and things that measured usage, the actual set of stats with a few exceptions (e.g. which tasks had instances) were the same.

Actions #4

Updated by Electric Monk about 1 month ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 617b28ccfac40348ebae033171d0643fcca18c22

commit  617b28ccfac40348ebae033171d0643fcca18c22
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2021-12-18T23:07:51.000Z

    14264 kstat_lookup and friends should take const strings
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF