Sponsored Content
Operating Systems AIX How to add the attribute to odm if it contains negative value? Post 302820665 by Sachin1987 on Thursday 13th of June 2013 07:57:25 AM
Old 06-13-2013
How to add the attribute to odm if it contains negative value?

Hi All,

I am trying to add odm_wait attribute to CuAt programatically using putattr(&pCuAt).

I was able to add when the odm_wait has positive value [i.e 0]. But, I am facing issues when the odm_wait has negative value [i.e-1]

As per IBM, these are the odm_wait possible values
Code:
#define ODM_WAIT   -1  /* Wait forever                               */
#define ODM_NOWAIT  0  /* Return immediately if lock cannot be granted */

This is the piece of code from my program.

Code:
strcpy(pCuAt.name, hdiskname);
                        strcpy(pCuAt.attribute, "odm_wait");
                        sprintf(pCuAt.value,"%d", odm_wait);
                        strcpy(pCuAt.type, "R");
                        strcpy(pCuAt.generic, "DU");
                        strcpy(pCuAt.rep, "nr");
                        pCuAt.nls_index=120;
                        if (putattr(&pCuAt) == -1)
                                printf("error: could not add attribute <odm_wait> to odm \n");
                        else
				printf("Notice : %s odm_wait attribute is added successfully: \n", hdiskname);

My program is running without any issue in both the cases [-1,0] and also I am not getting any error when the odm_wait attribute is -1.
But, when odm_wait attribute is -1, it is not actually adding the attribute to ODM.

When I try to access that value it is not displaying any records.
Code:
bash-3.2# odmget -q"name= hdisk7 and attribute=odm_wait" CuAt
bash-3.2#
bash-3.2#

Do we need to follow any other way to add the attribute when it has negative value?

Please help me to figure out the issue.

Many Thanks

Last edited by jim mcnamara; 06-13-2013 at 10:14 AM.. Reason: Code tags, please...
 

10 More Discussions You Might Find Interesting

1. Linux

File attribute Help please

Could anyone help i have a question that i have a problem with for my home work it is, How do i change file permissions in a command line enviromet thanx (1 Reply)
Discussion started by: Cube3k
1 Replies

2. UNIX for Advanced & Expert Users

Clean an LV out of the ODM

I recently had a disk crash and was not able to clean the dump lv off the disk. Now trying to create new lvdump I am running into errors. My question is how do I remove the old lv out of the ODM? I have tried going through smit and also just rmlv and it cannot find the lv. Yet when I run lslv on... (0 Replies)
Discussion started by: Wamland
0 Replies

3. UNIX Benchmarks

ocs_vtsup: error locking odm database

Someone know something about this error ? We have 5.2 and HACMP Cluster. (1 Reply)
Discussion started by: hjara
1 Replies

4. AIX

Removing devices from ODM

I have replace a couple of hdisks in and old AIX 4 system. I have them assigned to the hdisk numbers previously in the system. When I don an lsvg -p vgname, i see them old devices by device number still come up as missing. I think they are still in the ODM,, how can I remove them? Thanks Mike (5 Replies)
Discussion started by: mhenryj
5 Replies

5. AIX

Script for Comparing VGDA and ODM

Hi there guys, if you have already this script as this will help us in determining of the two are consistent, and if it is not, which is the one correct. Hope you also have for this one.:) (1 Reply)
Discussion started by: sky_lark02
1 Replies

6. AIX

Odm & Lvm

Can i have BIG help on ODM and LVM??? I m new to AIX..... Devang (2 Replies)
Discussion started by: 10aix
2 Replies

7. AIX

remove default gateway on ODM

Hi All, I remove the default gateway by using a command line but I need also to remove it from ODM so that reboot will not trigger it back. How do I remove it from ODM of AIX 5.3? Thanks for any comment you may add. (4 Replies)
Discussion started by: itik
4 Replies

8. AIX

Problem with the ODM base

Hi, I gonna try to explain my problem. When I list my tty I have something like that: sa3 is the RAN where the tty are connected. Yesterday I tried to delete every tty from the RAN I had a problem with a tty which was not possible to delete with rmdev -dl, so I had to : - delete it... (0 Replies)
Discussion started by: Castelior
0 Replies

9. AIX

Removing object from ODM base

Hello! I did a big mistake and now I have to change the ODM base manually :wall: I had a server of test with 2 VG (rootvg and datavg). I had to test something on it with an other AIX version. So, to be sure to restore it, i did a mksysb before but I had completly forgotten the second vg and... (1 Reply)
Discussion started by: Castelior
1 Replies

10. AIX

AIX Migration issue with EMC ODM sets

Hi Experts , I want to start migrating our AIX 6.1 to AIX 7.1 . I am planning to use alt_disk_migration . Chris gibson has awesome documentation in the internet. However I am running into an issue with EMC odm filesets . So my current OS is AIX 6.1. and I have this : lslpp -l | grep EMC ... (7 Replies)
Discussion started by: JME2015
7 Replies
GLGETATTRIBLOCATION(3G) 					   OpenGL Manual					   GLGETATTRIBLOCATION(3G)

NAME
glGetAttribLocation - Returns the location of an attribute variable C SPECIFICATION
GLint glGetAttribLocation(GLuint program, const GLchar *name); PARAMETERS
program Specifies the program object to be queried. name Points to a null terminated string containing the name of the attribute variable whose location is to be queried. DESCRIPTION
glGetAttribLocation queries the previously linked program object specified by program for the attribute variable specified by name and returns the index of the generic vertex attribute that is bound to that attribute variable. If name is a matrix attribute variable, the index of the first column of the matrix is returned. If the named attribute variable is not an active attribute in the specified program object or if name starts with the reserved prefix "gl_", a value of -1 is returned. The association between an attribute variable name and a generic attribute index can be specified at any time by calling glBindAttribLocation(). Attribute bindings do not go into effect until glLinkProgram() is called. After a program object has been linked successfully, the index values for attribute variables remain fixed until the next link command occurs. The attribute values can only be queried after a link if the link was successful. glGetAttribLocation returns the binding that actually went into effect the last time glLinkProgram() was called for the specified program object. Attribute bindings that have been specified since the last link operation are not returned by glGetAttribLocation. ERRORS
GL_INVALID_OPERATION is generated if program is not a value generated by OpenGL. GL_INVALID_OPERATION is generated if program is not a program object. GL_INVALID_OPERATION is generated if program has not been successfully linked. ASSOCIATED GETS
glGetActiveAttrib() with argument program and the index of an active attribute glIsProgram() SEE ALSO
glBindAttribLocation(), glLinkProgram(), glVertexAttrib(), glVertexAttribPointer() COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. AUTHORS
opengl.org opengl.org 06/10/2014 GLGETATTRIBLOCATION(3G)
All times are GMT -4. The time now is 02:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy