Back to index

glibc  2.9
utimes.c File Reference
#include <sys/time.h>
#include <errno.h>
#include <stddef.h>
#include <hurd.h>

Go to the source code of this file.


int __utimes (char *file, tvp) const

Function Documentation

int __utimes ( char *  file,
) const

Definition at line 28 of file utimes.c.

  union tv
    struct timeval tv;
    time_value_t tvt;
  const union tv *u = (const union tv *) tvp;
  union tv nulltv[2];
  error_t err;
  file_t port;

  if (tvp == NULL)
      /* Setting the number of microseconds to `-1' tells the
         underlying filesystems to use the current time.  */
      nulltv[0].tvt.microseconds = nulltv[1].tvt.microseconds = -1;
      u = nulltv;

  port = __file_name_lookup (file, 0, 0);
  if (port == MACH_PORT_NULL)
    return -1;
  err = __file_utimes (port, u[0].tvt, u[1].tvt);
  __mach_port_deallocate (__mach_task_self (), port);
  if (err)
    return __hurd_fail (err);
  return 0;

Here is the call graph for this function: