|
fs_config_get_devs(3)
Contents
|
fs_config_get_devs - Obtains a list of devices in an
AdvFS domain configuration.
#include <stocfg/fs_config.h>
char *fs_config_get_devs(
char *config,
char **err_buf);
);
File System & Storage Configuration Library libstocfg
Points to a domain configuration description expressed in
XML format. See fs_save_config for information on saving
a configuration and its format. Points to a pointer to a
location in which the function stores an error message.
Use this function to obtain a list of devices from which
an AdvFS domain is built. The list, expressed in XML
markup, contains physical disks used directly by AdvFS
volumes and those used to make up LSM volumes. Different
tags show disks used directly for AdvFS volumes or for LSM
volumes.
See EXAMPLES for more information.
The calling function is responsible for freeing memory
allocated for the device list and the error message.
On successful completion, the function returns a pointer
to a character buffer.
On failure, the function returns a NULL and sets **err_buf
to point to an error message.
The following are some error messages for this function
along with suggested solutions:
See /usr/lib/nls/msg/$LANG/stocfg.cat for a complete listing
of error messages.
The following program shows how to obtain a device list by
using the fs_config_get_devs function. #include
<sys/types.h> #include <stdio.h> #include <stocfg/fs_config.h>
main(int argc, char **argv) {
char *devlist=NULL,*config=NULL,*err_buf=NULL;
char *getFileContents(char *);
if(argc < 2)
{
printf("Usage: %s: <config_file> \n",*argv);
exit(0);
}
config = getFileContents(*(argv +1));
devlist = fs_config_get_devs(config, &err_buf); } output
. . . <vol_name>/dev/disk/dsk1</vol_name>
<dg_disk_name>/dev/disk/dsk11</dg_disk_name>
<dg_disk_name>/dev/disk/dsk15</dg_disk_name>
Functions: fs_get_dom_list(3), fs_get_fset_list(3),
fs_save_config(3),
fs_restore_config(3)
Files:
fs_config_data(4) </docbook>
fs_config_get_devs(3)
[ Back ] |