2
* Copyright (c) 2008-2010 Alper Akcan <alper.akcan@gmail.com>
3
* Copyright (c) 2009-2010 Renzo Davoli <renzo@cs.unibo.it>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program (in the main directory of the fuse-ext2
17
* distribution in the file COPYING); if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "fuse-ext2.h"
23
int op_utimens (const char *path, const struct timespec tv[2])
28
struct ext2_vnode *vnode;
29
struct ext2_inode *inode;
32
e2fs = current_ext2fs();
35
debugf("path = %s", path);
37
rt = do_readvnode(e2fs, path, &ino, &vnode, DONT_OPEN_FILE);
39
debugf("do_readvnode(%s, &ino, &vnode); failed", path);
43
inode = vnode2inode(vnode);
45
inode->i_atime = tv[0].tv_sec;
46
inode->i_mtime = tv[0].tv_sec;
48
rc=vnode_put(vnode,1);
50
debugf("vnode_put(vnode,1); failed");