 |
Index for Section 3 |
|
 |
Alphabetical listing for F |
|
 |
Bottom of page |
|
fs_config_get_devs(3)
NAME
fs_config_get_devs - Obtains a list of devices in an AdvFS domain
configuration.
SYNOPSIS
#include <stocfg/fs_config.h>
char *fs_config_get_devs(
char *config,
char **err_buf);
);
LIBRARY
File System & Storage Configuration Library libstocfg
PARAMETERS
*config
Points to a domain configuration description expressed in XML format.
See fs_save_config for information on saving a configuration and its
format.
**err_buf
Points to a pointer to a location in which the function stores an error
message.
DESCRIPTION
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.
NOTES
The calling function is responsible for freeing memory allocated for the
device list and the error message.
RETURN VALUES
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.
ERRORS
The following are some error messages for this function along with
suggested solutions:
Empty configuration list -- verify the file path/name
Failed parsing config data -- verify the configuration definition
See /usr/lib/nls/msg/$LANG/stocfg.cat for a complete listing of error
messages.
EXAMPLES
1. 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>
SEE ALSO
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>
 |
Index for Section 3 |
|
 |
Alphabetical listing for F |
|
 |
Top of page |
|