26.02.2014 Views

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG. Alphabetical listing of connect and I/O functions<br />

typedef union {<br />

struct _io_chmod i;<br />

} io_chmod_t;<br />

Description: Responsible for changing the mode for the resource identified by the<br />

passed ocb to the value specified by the mode message member.<br />

Returns: The status via the helper macro _RESMGR_STATUS.<br />

io_chown()<br />

int io_chown (resmgr_context_t *ctp, io_chown_t *msg,<br />

RESMGR_OCB_T *ocb)<br />

Classification: I/O function<br />

Default handler: iofunc_chown_default()<br />

Helper functions: iofunc_chown()<br />

Client functions: chown(), fchown()<br />

Messages: _IO_CHOWN<br />

Data structure:<br />

struct _io_chown {<br />

uint16_t type;<br />

uint16_t combine_len;<br />

int32_t gid;<br />

int32_t uid;<br />

};<br />

typedef union {<br />

struct _io_chown i;<br />

} io_chown_t;<br />

Description: Responsible for changing the user ID and group ID fields for the resource<br />

identified by the passed ocb to uid and gid, respectively. Note that the mount structure<br />

flag IOFUNC_PC_CHOWN_RESTRICTED and the OCB flag field should be examined<br />

to determine whether the filesystem allows chown() to be performed by non-root<br />

users.<br />

Returns: The status via the helper macro _RESMGR_STATUS.<br />

io_close_dup()<br />

int io_close_dup (resmgr_context_t *ctp, io_close_t *msg,<br />

RESMGR_OCB_T *ocb)<br />

Classification: I/O function<br />

Default handler: iofunc_close_dup_default()<br />

Helper functions: iofunc_close_dup()<br />

Client functions: close(), fclose()<br />

Messages: _IO_CLOSE_DUP<br />

April 30, 2009 Chapter 5 • Resource Managers 231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!