Project

General

Profile

Bug #9903

qinfo: add typed members

Added by Toomas Soome about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2018-10-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Hard
Tags:

Description

The STREAMS struct qinfo does define the qinit(9s) procedures, unfortunately in our case, without proper types. This is bad because without the proper function types, our compiler is unable to help us to identify the bugs. In this update we add proper types and fix the issues identified by gcc 4.4.4-il and gcc 7. The patch will allow us to identify more issues with gcc 8, because gcc 8 does perform better function signature checks.

Functions:

typedef int (*qi_putp_t)(queue_t *, mblk_t *);
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/os/strsubr.c#6777

typedef int (*qi_srvp_t)(queue_t *);
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/os/strsubr.c#3655

typedef int (*qi_qopen_t)(queue_t *, dev_t *, int, int, cred_t *);
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/os/strsubr.c#1200

typedef int (*qi_qclose_t)(queue_t *, int, cred_t *);
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/os/strsubr.c#1280

typedef int (*qi_qadmin_t)(void);
only defined as qinfo member, not used anywhere.

typedef int (*qi_rwp_t)(queue_t *, struiod_t *);
local var setup: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/io/stream.c#3787
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/io/stream.c#3869

typedef int (*qi_infop_t)(queue_t *, infod_t *);
local var setup: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/io/stream.c#3962
use case: http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/io/stream.c#3989

And finally, see also: http://www.openss7.net/man2html?qinit(9)


Related issues

Related to illumos gate - Bug #9901: ip: rts_wput_other: this statement may fall throughClosed2018-10-16

Actions
Related to illumos gate - Bug #9900: fcip: debug statement is mixed upClosed

Actions
Related to illumos gate - Bug #9902: mac: mac_soft_ring_poll should use size_tClosed

Actions

History

#1

Updated by Toomas Soome about 1 year ago

  • Parent task changed from #9900 to #9902
#2

Updated by Toomas Soome about 1 year ago

  • Related to Bug #9901: ip: rts_wput_other: this statement may fall through added
#3

Updated by Toomas Soome about 1 year ago

  • Related to Bug #9900: fcip: debug statement is mixed up added
#4

Updated by Toomas Soome about 1 year ago

  • Parent task deleted (#9902)
#5

Updated by Toomas Soome about 1 year ago

  • Related to Bug #9902: mac: mac_soft_ring_poll should use size_t added
#6

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
#7

Updated by Electric Monk about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 5e1743f0d6a1d79ccc247d50153ad830fa07768b

commit  5e1743f0d6a1d79ccc247d50153ad830fa07768b
Author: Toomas Soome <tsoome@me.com>
Date:   2018-11-26T16:11:27.000Z

    9903 qinfo: add typed members
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF