42
42
/** @name Filesystem Object Mode Flags.
44
* There are two sets of flags: the unix mode flags and the dos
44
* There are two sets of flags: the unix mode flags and the dos attributes.
47
46
* APIs returning mode flags will provide both sets.
49
* When specifying mode flags to any API at least one of
50
* them must be given. If one set is missing the API will
51
* synthesize it from the one given if it requires it.
53
* Both sets match their x86 ABIs, the DOS/NT one is simply shifted
54
* up 16 bits. The DOS/NT range is bits 16 to 31 inclusively. The
55
* Unix range is bits 0 to 15 (inclusively).
48
* When specifying mode flags to any API at least one of them must be given. If
49
* one set is missing the API will synthesize it from the one given if it
52
* Both sets match their x86 ABIs, the DOS/NT one is simply shifted up 16 bits.
53
* The DOS/NT range is bits 16 to 31 inclusively. The Unix range is bits 0 to 15
56
* @remarks These constants have been comitted to a binary format and must not
57
* be changed in any incompatible ways.
263
265
/** No additional information is available / requested. */
264
266
RTFSOBJATTRADD_NOTHING = 1,
265
/** The additional unix attributes (RTFSOBJATTR::u::Unix) are available / requested. */
267
/** The additional unix attributes (RTFSOBJATTR::u::Unix) are available /
266
269
RTFSOBJATTRADD_UNIX,
270
/** The additional unix attributes (RTFSOBJATTR::u::UnixOwner) are
271
* available / requested. */
272
RTFSOBJATTRADD_UNIX_OWNER,
273
/** The additional unix attributes (RTFSOBJATTR::u::UnixGroup) are
274
* available / requested. */
275
RTFSOBJATTRADD_UNIX_GROUP,
267
276
/** The additional extended attribute size (RTFSOBJATTR::u::EASize) is available / requested. */
268
277
RTFSOBJATTRADD_EASIZE,
269
278
/** The last valid item (inclusive).
274
283
RTFSOBJATTRADD_32BIT_SIZE_HACK = 0x7fffffff
275
284
} RTFSOBJATTRADD;
286
/** The number of bytes reserved for the additional attribute union. */
287
#define RTFSOBJATTRUNION_MAX_SIZE 128
290
* Additional Unix Attributes (RTFSOBJATTRADD_UNIX).
292
typedef struct RTFSOBJATTRUNIX
294
/** The user owning the filesystem object (st_uid).
295
* This field is NIL_UID if not supported. */
298
/** The group the filesystem object is assigned (st_gid).
299
* This field is NIL_GID if not supported. */
302
/** Number of hard links to this filesystem object (st_nlink).
303
* This field is 1 if the filesystem doesn't support hardlinking or
304
* the information isn't available.
308
/** The device number of the device which this filesystem object resides on (st_dev).
309
* This field is 0 if this information is not available. */
312
/** The unique identifier (within the filesystem) of this filesystem object (st_ino).
313
* Together with INodeIdDevice, this field can be used as a OS wide unique id
314
* when both their values are not 0.
315
* This field is 0 if the information is not available. */
318
/** User flags (st_flags).
319
* This field is 0 if this information is not available. */
322
/** The current generation number (st_gen).
323
* This field is 0 if this information is not available. */
324
uint32_t GenerationId;
326
/** The device number of a character or block device type object (st_rdev).
327
* This field is 0 if the file isn't of a character or block device type and
328
* when the OS doesn't subscribe to the major+minor device idenfication scheme. */
334
* Additional Unix Attributes (RTFSOBJATTRADD_UNIX_OWNER).
336
* @remarks This interface is mainly for TAR.
338
typedef struct RTFSOBJATTRUNIXOWNER
340
/** The user owning the filesystem object (st_uid).
341
* This field is NIL_UID if not supported. */
344
* Empty if not available or not supported, truncated if too long. */
345
char szName[RTFSOBJATTRUNION_MAX_SIZE - sizeof(RTUID)];
346
} RTFSOBJATTRUNIXOWNER;
350
* Additional Unix Attributes (RTFSOBJATTRADD_UNIX_GROUP).
352
* @remarks This interface is mainly for TAR.
354
typedef struct RTFSOBJATTRUNIXGROUP
356
/** The user owning the filesystem object (st_uid).
357
* This field is NIL_GID if not supported. */
360
* Empty if not available or not supported, truncated if too long. */
361
char szName[RTFSOBJATTRUNION_MAX_SIZE - sizeof(RTGID)];
362
} RTFSOBJATTRUNIXGROUP;
279
366
* Filesystem object attributes.
282
368
typedef struct RTFSOBJATTR
284
370
/** Mode flags (st_mode). RTFS_UNIX_*, RTFS_TYPE_*, and RTFS_DOS_*. */
296
382
union RTFSOBJATTRUNION
298
/** Additional Unix Attributes
299
* These are available when RTFSOBJATTRADD is set in fUnix.
301
struct RTFSOBJATTRUNIX
303
/** The user owning the filesystem object (st_uid).
304
* This field is ~0U if not supported. */
307
/** The group the filesystem object is assigned (st_gid).
308
* This field is ~0U if not supported. */
311
/** Number of hard links to this filesystem object (st_nlink).
312
* This field is 1 if the filesystem doesn't support hardlinking or
313
* the information isn't available.
317
/** The device number of the device which this filesystem object resides on (st_dev).
318
* This field is 0 if this information is not available. */
321
/** The unique identifier (within the filesystem) of this filesystem object (st_ino).
322
* Together with INodeIdDevice, this field can be used as a OS wide unique id
323
* when both their values are not 0.
324
* This field is 0 if the information is not available. */
327
/** User flags (st_flags).
328
* This field is 0 if this information is not available. */
331
/** The current generation number (st_gen).
332
* This field is 0 if this information is not available. */
333
uint32_t GenerationId;
335
/** The device number of a character or block device type object (st_rdev).
336
* This field is 0 if the file isn't of a character or block device type and
337
* when the OS doesn't subscribe to the major+minor device idenfication scheme. */
384
/** Additional Unix Attributes - RTFSOBJATTRADD_UNIX. */
385
RTFSOBJATTRUNIX Unix;
386
/** Additional Unix Owner Attributes - RTFSOBJATTRADD_UNIX_OWNER. */
387
RTFSOBJATTRUNIXOWNER UnixOwner;
388
/** Additional Unix Group Attributes - RTFSOBJATTRADD_UNIX_GROUP. */
389
RTFSOBJATTRUNIXGROUP UnixGroup;
342
392
* Extended attribute size is available when RTFS_DOS_HAVE_EA_SIZE is set.