How to use getdiskbyname() API


 
Thread Tools Search this Thread
Operating Systems HP-UX How to use getdiskbyname() API
# 1  
Old 02-15-2009
How to use getdiskbyname() API

I would like to use getdiskbyname() this API to get disk size and disk usage


can any one give me an example of c program


thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Face-api.js — JavaScript API for Face Recognition in the Browser with tensorflow.js

Ref: https://itnext.io/face-api-js-javascript-api-for-face-recognition-in-the-browser-with-tensorflow-js-bcc2a6c4cf07 (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

Need to run an API from a script and extract fields from output of API

Hi, I need to call an API (GetUsageDetails)from inside a shell script which takes an input argument acct_nbr. The output of API will be like : <usageAccum accumId="450" accumCaptn="PM_125" inclUnits="1410.00" inclUnitsUsed="744.00" shared="true" pooled="false" prorated="false"... (1 Reply)
Discussion started by: rkrish
1 Replies

3. Programming

perl api

Does anyone have any example of how to use the perl api within Build Forge (0 Replies)
Discussion started by: saku
0 Replies

4. Programming

API in C for compress (.Z) ?

Hi all, I would like to know if an API for compress (.Z) exists in C ? I want to write a program which process a large number of data files with efficient compression at the end. Thanks http://fedora.unix.com/images/misc/progress.gif (4 Replies)
Discussion started by: domiq44
4 Replies

5. Linux

New collectl API

If anyone is interested I just released a new version that contains an API for collecting any kind of data you want and to include it in the user interface, data files and even be able to send it via sockets to other tools. Of course you need to be a perl programmer to use it... A second... (0 Replies)
Discussion started by: MarkSeger
0 Replies

6. Programming

LDAP - is there an API

Hi, I've just been experimenting with AIX's ldapsearch utility - I've been successfully using it to retrieve information from an Active Directory, however, I need to make similar calls from a C program. Is there a suitable LDAP API on AIX which will give me similar capabilties to the... (3 Replies)
Discussion started by: phykell
3 Replies

7. UNIX for Dummies Questions & Answers

tyoes of API

What is Low-Level API and High-Level API? (1 Reply)
Discussion started by: sumsin
1 Replies

8. AIX

API question

Machine and OS : IBM 7044-170 AIX 4.3.3 Hi, everyone I have a question , pls help me to resolve. In IBM AIX , how to obtain the CPU Load and other infomations by System API Fuction. Wait for your reply ......., Thanks. (0 Replies)
Discussion started by: q30
0 Replies
Login or Register to Ask a Question
createlabel(3)						     Library Functions Manual						    createlabel(3)

NAME
createlabel - Creates a disk label structure for a disk device LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <sys/disklabel.h> int createlabel( char *devname, char *name, struct disklabel *disk, char *boot, int boot_len); PARAMETERS
Specifies the device special file name of the device. Specifies the name entry in the /etc/disktab file that is to be used for the label information. Otherwise, specify NULL to indicate that the name entry either is not in the /etc/disktab file, or, if it is, that it should be ignored. Points to the disk label structure that is filled in with the returned disk description on successful completion of the func- tion. Points to the buffer that the function may use to contain the (optional) primary and secondary bootstrap names for the disk label. Specifies the length of the boot buffer. The value must be set to the value of the BUFSIZ constant. DESCRIPTION
The function fills in the disk label structure pointed to by the disk parameter. The resulting disk label can then be written to the disk in order to label it. The function queries the device, using the devname parameter, to obtain the disk's geometry, capacity, and any default partition informa- tion. The function checks the name parameter. If name is non-null, the function looks for an entry in the /etc/disktab file that matches the name string and initializes the disk label structure from that entry. The function then overrides the device data and initializes the disk label structure from the entry in the /etc/disktab file. If the name string is NULL, or has no matching entry in the /etc/disktab file, the function queries the device (using the devname parame- ter) to obtain the device's name string. The function then looks for an entry in the /etc/disktab file that matches that name string, and if it finds a match, initializes the disk label structure from that entry. If an /etc/disktab entry indicates that the device has a dynamic geometry, the function queries the device (using the devname parameter) to obtain the disk's true geometry and capacity and to override any value given in an /etc/disktab entry associated with the device. In this case, any -1 lengths encountered in the partition specifications for the entry are replaced by a value equal to the device's total capacity minus the starting offset of the partition. RETURN VALUES
Upon successful completion of the createlabel function, a value of 0 is returned and the contents of the disk label structure are updated. Upon error, a value of -1 is returned and errno is set to [EINVAL]. ERRORS
Either disk or boot is NULL, or boot_len is not equal to BUFSIZ. FILES
Table of disk partition sizes for supported disks. RELATED INFORMATION
Commands: disklabel(8) Functions: getdiskbyname(3). Files: disklabel(4), disktab(4) delim off createlabel(3)