[Previous] [Contents] [Next]

iofunc_utime_default()

Default handler for _IO_UTIME messages

Synopsis:

#include <sys/iofunc.h>

int iofunc_utime_default( resmgr_context_t* ctp,
                          io_utime_t* msg,
                          iofunc_ocb_t* ocb );

Library:

libc

Description:

The iofunc_utime_default() function implements POSIX semantics for the client's utime() call, which is received as an _IO_UTIME message by the resource manager. This function can be placed directly into the io_funcs table passed to resmgr_attach(), at the utime position.

The iofunc_utime_default() function verifies that the client has the necessary permissions to effect a utime on the device. If so, the utime is performed, modifying elements of the ocb->attr structure. This function takes care of updating the IOFUNC_ATTR_ATIME, IOFUNC_ATTR_CTIME, IOFUNC_ATTR_MTIME, IOFUNC_ATTR_DIRTY_TIME, and IOFUNC_ATTR_DIRTY_MODE bits in the flags member of ocb->attr. The iofunc_time_update() function can be used to update the appropriate time fields in ocb->attr.

Returns:

EOK
Successful completion.
EROFS
An attempt was made to utime a read-only filesystem.
EACCES
The client doesn't have permissions to do the operation.
EPERM
The group ID or owner ID didn't match.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

iofunc_chmod_default(), iofunc_chown_default(), iofunc_close_dup_default(), iofunc_close_ocb_default(), iofunc_devctl_default(), iofunc_lock_default(), iofunc_lseek_default(), iofunc_mmap_default(), iofunc_open_default(), iofunc_pathconf_default(), iofunc_stat_default(), iofunc_time_update(), iofunc_unblock_default(), resmgr_attach()


[Previous] [Contents] [Next]