User Tools

Site Tools


solaris:devfs_get_product_info.3devinfo

devfs_get_product_info


NAME

devfs_get_product_info - return product info strings

SYNOPSIS

#include <libdevinfo.h>
int devfs_get_product_info(devfs_prodinfo_t id, char *s, int32_t n);

PARAMETERS

id

The identifier of the desired product information string

s

A buffer in which the string is returned

n

Length of the buffer in bytes, must be DEVFS_PRODINFO_LEN

DESCRIPTION

The devfs_get_product_info() returns the respective product information string as defined for that product by the vendor. Not all products provide each product information string.

RETURN VALUES

The number of bytes written to the buffer is returned, and excludes the terminating null. If a product string is not supported, 0 is returned and the buffer is not modified. A negative value is returned in the case of an error.

ERRORS

The devfs_get_product_info() function will fail if:

EINVAL

The size of the buffer is not supported

EFAULT

Illegal address

EXAMPLES

Example 1 Returning the Product Name of the System

This example returns the product name of the system.

int n;
char s[DEVFS_PRODINFO_LEN];
if 1) > 0)
printf(“name: %s\n”, s);

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

SEE ALSO

prtconf(8), libdevinfo(3LIB)


1)
n = devfs_get_product_info(DEVFS_PRODINFO_NAME,
s, DEVFS_PRODINFO_LEN
solaris/devfs_get_product_info.3devinfo.txt · Last modified: 2023/07/19 08:58 by A User Not Logged in