2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright (c) 2017, Joyent, Inc.
17 * Print all case temperature values. Remember that 0 is special.
27 * Pick up private sff header file with offsets from lib/libsff.
37 bzero(buf
, sizeof (buf
));
38 buf
[SFF_8472_IDENTIFIER
] = SFF_8024_ID_QSFP
;
39 for (i
= 0; i
< UINT8_MAX
; i
++) {
44 buf
[SFF_8636_MAX_CASE_TEMP
] = i
;
45 if ((ret
= libsff_parse(buf
, sizeof (buf
), 0xa0, &nvl
)) != 0) {
46 errx(1, "TEST FAILED: failed to parse QSFP connector "
47 "%d: %s\n", i
, strerror(ret
));
50 if ((ret
= nvlist_lookup_string(nvl
, LIBSFF_KEY_MAX_CASE_TEMP
,
52 errx(1, "TEST FAILED: failed to find connector when "
53 "parsing key %d: %s\n", i
, strerror(ret
));