~ubuntu-branches/ubuntu/precise/torque/precise-updates

« back to all changes in this revision

Viewing changes to src/include/attribute.h

  • Committer: Bazaar Package Importer
  • Author(s): Dominique Belhachemi
  • Date: 2010-05-17 20:56:46 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100517205646-yjsoqs5r1s9xpnu9
Tags: upstream-2.4.8+dfsg
ImportĀ upstreamĀ versionĀ 2.4.8+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
* are permitted provided that all of the following conditions are met.
21
21
* After December 31, 2001, only conditions 3-6 must be met:
22
22
*
23
 
* 1. Commercial and/or non-commercial use of the Software is permitted
24
 
*    provided a current software registration is on file at www.OpenPBS.org.
25
 
*    If use of this software contributes to a publication, product, or
26
 
*    service, proper attribution must be given; see www.OpenPBS.org/credit.html
27
 
*
28
 
* 2. Redistribution in any form is only permitted for non-commercial,
29
 
*    non-profit purposes.  There can be no charge for the Software or any
30
 
*    software incorporating the Software.  Further, there can be no
31
 
*    expectation of revenue generated as a consequence of redistributing
32
 
*    the Software.
33
 
*
34
23
* 3. Any Redistribution of source code must retain the above copyright notice
35
24
*    and the acknowledgment contained in paragraph 6, this list of conditions
36
25
*    and the disclaimer contained in paragraph 7.
122
111
#define ATRPART  3
123
112
 
124
113
/*
125
 
 * The following structure, svrattrl is used to hold the external form of
126
 
 * attributes.
127
 
 *
 
114
 * The svrattrl structure is used to hold the external form of attributes.
128
115
 */
129
116
 
130
117
struct svrattrl
131
118
  {
132
 
  list_link al_link;
 
119
  list_link      al_link;
133
120
 
134
121
  struct attropl al_atopl;    /* name,resource,value, see pbs_ifl.h   */
135
 
  int  al_tsize;    /* size of this structure (variable)    */
136
 
  int  al_nameln;   /* len of name string (including null)  */
137
 
  int  al_rescln;   /* len of resource name string (+ null) */
138
 
  int  al_valln;    /* len of value, may contain many nulls */
 
122
  int            al_tsize;    /* size of this structure (variable)    */
 
123
  int            al_nameln;   /* len of name string (including null)  */
 
124
  int            al_rescln;   /* len of resource name string (+ null) */
 
125
  int            al_valln;    /* len of value, may contain many nulls */
139
126
 
140
 
unsigned int al_flags:
 
127
  unsigned int   al_flags:
141
128
  ATRFLAG;   /* copy of attribute value flags */
142
 
  /*
143
 
   * data follows directly after
144
 
   */
 
129
 
 
130
  /* data follows directly after */
145
131
  };
146
132
 
147
133
typedef struct svrattrl svrattrl;
151
137
#define al_value al_atopl.value
152
138
#define al_op  al_atopl.op
153
139
 
 
140
 
 
141
 
154
142
/*
155
143
 * The value of an attribute is contained in the following structure.
156
144
 *
224
212
  void (*at_free)A_((attribute *pattr));
225
213
  int (*at_action)A_((attribute *pattr, void *pobject, int actmode));
226
214
 
227
 
unsigned int at_flags:
 
215
  unsigned int at_flags:
228
216
  ATRFLAG; /* flags: perms, ...  */
229
217
 
230
 
unsigned int at_type:
 
218
  unsigned int at_type:
231
219
  ATRTYPE; /* type of attribute  */
232
220
 
233
 
unsigned int at_parent:
 
221
  unsigned int at_parent:
234
222
  ATRPART; /* type of parent object */
235
223
  };
236
224
 
242
230
#define ATR_TYPE_CHAR    2 /* single character */
243
231
#define ATR_TYPE_STR     3 /* string, null terminated */
244
232
#define ATR_TYPE_ARST    4 /* Array of strings (char **) */
245
 
#define ATR_TYPE_SIZE  5 /* size (integer + suffix) */
246
 
#define ATR_TYPE_RESC  6 /* list type: resources only */
 
233
#define ATR_TYPE_SIZE    5 /* size (integer + suffix) */
 
234
#define ATR_TYPE_RESC    6 /* list type: resources only */
247
235
#define ATR_TYPE_LIST    7 /* list type:  dependencies, unkn, etc */
248
 
#define ATR_TYPE_ACL  8 /* Access Control Lists */
249
 
#define ATR_TYPE_LL  9 /* Long (64 bit) integer */
250
 
#define ATR_TYPE_SHORT  10 /* short integer    */
 
236
#define ATR_TYPE_ACL     8 /* Access Control Lists */
 
237
#define ATR_TYPE_LL      9 /* Long (64 bit) integer */
 
238
#define ATR_TYPE_SHORT   10 /* short integer    */
251
239
#define ATR_TYPE_JINFOP  13 /* struct jobinfo*  */
252
240
 
253
241
/* Defines for  Flag field in attribute_def         */
260
248
#define ATR_DFLAG_MGWR   0x20 /* Manager client can write attribute */
261
249
#define ATR_DFLAG_PRIVR  0x40 /* Private (only owner, oper, manager can read) */
262
250
#define ATR_DFLAG_Creat  0x80 /* Can be set on create only */
263
 
#define ATR_DFLAG_SvRD  0x100 /* job attribute is sent to server on move */
264
 
#define ATR_DFLAG_SvWR  0x200 /* job attribute is settable by server/Sch */
 
251
#define ATR_DFLAG_SvRD   0x100 /* job attribute is sent to server on move */
 
252
#define ATR_DFLAG_SvWR   0x200 /* job attribute is settable by server/Sch */
265
253
#define ATR_DFLAG_MOM    0x400 /* attr/resc sent to MOM "iff" set    */
 
254
 
266
255
#define ATR_DFLAG_RDACC  0x515 /* Read access mask  */
267
256
#define ATR_DFLAG_WRACC  0x6AA /* Write access mask */
268
257
#define ATR_DFLAG_ACCESS 0x7ff /* Mask access flags */
293
282
/* Defines for Parent Object type field in the attribute definition */
294
283
/* really only used for telling queue types apart   */
295
284
 
296
 
#define PARENT_TYPE_JOB   1
 
285
#define PARENT_TYPE_JOB      1
297
286
#define PARENT_TYPE_QUE_ALL  2
298
287
#define PARENT_TYPE_QUE_EXC  3
299
288
#define PARENT_TYPE_QUE_RTE  4
300
 
#define PARENT_TYPE_QUE_PULL  5
301
 
#define PARENT_TYPE_SERVER  6
302
 
#define PARENT_TYPE_NODE  7
 
289
#define PARENT_TYPE_QUE_PULL 5
 
290
#define PARENT_TYPE_SERVER   6
 
291
#define PARENT_TYPE_NODE     7
303
292
/* DIAGTODO: define PARENT_TYPE_DIAG, but atrpart field isn't wide enough */
304
293
 
305
294
/*
342
331
extern void clear_attr A_((attribute *pattr, attribute_def *pdef));
343
332
extern int  find_attr  A_((attribute_def *attrdef, char *name, int limit));
344
333
extern int  recov_attr A_((int fd, void *parent, attribute_def *padef,
345
 
                             attribute *pattr, int limit, int unknown));
 
334
                           attribute *pattr, int limit, int unknown, int do_actions));
346
335
extern long attr_ifelse_long A_((attribute *, attribute *, long));
347
336
extern void free_null  A_((attribute *attr));
348
337
extern void free_noop  A_((attribute *attr));
366
355
extern int  decode_time  A_((attribute *patr, char *name, char *rn, char *val));
367
356
extern int  decode_arst  A_((attribute *patr, char *name, char *rn, char *val));
368
357
extern int  decode_arst_direct  A_((attribute *patr, char *val));
 
358
extern int  decode_arst_merge  A_((attribute *,char *,char *,char *));
369
359
extern int  decode_resc  A_((attribute *patr, char *name, char *rn, char *val));
370
360
extern int  decode_depend A_((attribute *patr, char *name, char *rn, char *val));
371
361
extern int  decode_hold A_((attribute *patr, char *name, char *rn, char *val));