1 /* Created (MFS based):
2 * February 2010 (Evgeniy Ivanov)
10 * Match by inode number in a puffs_pn_nodewalk call. This should not exist.
13 find_inode_cb(struct puffs_usermount
* __unused pu
, struct puffs_node
* pn
,
17 if (pn
->pn_va
.va_fileid
== *(ino_t
*)arg
)
23 /*===========================================================================*
25 *===========================================================================*/
26 int update_timens(struct puffs_node
*pn
, int flags
, struct timespec
*t
)
30 struct timespec new_time
;
31 PUFFS_MAKECRED(pcr
, &global_kcred
);
36 if (global_pu
->pu_ops
.puffs_node_setattr
== NULL
)
42 (void)clock_time(&new_time
);
44 puffs_vattr_null(&va
);
45 /* librefuse modifies atime and mtime together,
46 * so set old values to avoid setting either one
47 * to PUFFS_VNOVAL (set by puffs_vattr_null).
49 va
.va_atime
= pn
->pn_va
.va_atime
;
50 va
.va_mtime
= pn
->pn_va
.va_mtime
;
53 va
.va_atime
= new_time
;
55 va
.va_mtime
= new_time
;
57 va
.va_ctime
= new_time
;
59 r
= global_pu
->pu_ops
.puffs_node_setattr(global_pu
, pn
, &va
, pcr
);
65 /*===========================================================================*
67 *===========================================================================*/
68 void lpuffs_debug(const char *format
, ...)
72 va_start (args
, format
);
73 vsprintf (buffer
,format
, args
);
74 printf("%s: %s", fs_name
, buffer
);