[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 15/31: libtrivfs: fix error handling
From: |
Samuel Thibault |
Subject: |
[hurd] 15/31: libtrivfs: fix error handling |
Date: |
Mon, 02 May 2016 23:48:32 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit d67a86c9690c2a9984ca6e9f3c376956495897f4
Author: Justus Winter <address@hidden>
Date: Mon Apr 25 00:48:56 2016 +0200
libtrivfs: fix error handling
* libtrivfs/times.c (trivfs_set_{a,m}time): Fix error handling.
---
libtrivfs/times.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/libtrivfs/times.c b/libtrivfs/times.c
index 5f08cb1..42e668d 100644
--- a/libtrivfs/times.c
+++ b/libtrivfs/times.c
@@ -20,29 +20,37 @@
error_t
trivfs_set_atime (struct trivfs_control *cntl)
{
+ error_t err;
struct stat st;
time_value_t atime;
time_value_t mtime;
-
- io_stat (cntl->underlying, &st);
+
+ err = io_stat (cntl->underlying, &st);
+ if (err)
+ return err;
+
mtime.seconds = st.st_mtim.tv_sec;
mtime.microseconds = st.st_mtim.tv_nsec / 1000;
atime.microseconds = -1;
- file_utimes (cntl->underlying, atime, mtime);
- return 0;
+
+ return file_utimes (cntl->underlying, atime, mtime);
}
error_t
trivfs_set_mtime (struct trivfs_control *cntl)
{
+ error_t err;
struct stat st;
time_value_t atime;
time_value_t mtime;
- io_stat (cntl->underlying, &st);
+ err = io_stat (cntl->underlying, &st);
+ if (err)
+ return err;
+
atime.seconds = st.st_atim.tv_sec;
atime.microseconds = st.st_atim.tv_nsec / 1000;
mtime.microseconds = -1;
- file_utimes (cntl->underlying, atime, mtime);
- return 0;
+
+ return file_utimes (cntl->underlying, atime, mtime);
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (b5a5ed2 -> b90164e), Samuel Thibault, 2016/05/02
- [hurd] 03/31: Use swapon path as pager partition path, Samuel Thibault, 2016/05/02
- [hurd] 05/31: Update NEWS file, Samuel Thibault, 2016/05/02
- [hurd] 14/31: libdiskfs: improve error handling, Samuel Thibault, 2016/05/02
- [hurd] 15/31: libtrivfs: fix error handling,
Samuel Thibault <=
- [hurd] 17/31: Fix supporting >4GiB files in ext2fs, Samuel Thibault, 2016/05/02
- [hurd] 18/31: libdiskfs: Reject LFS seeks and read/writes, Samuel Thibault, 2016/05/02
- [hurd] 22/31: Unify and document the way fsids are handled in trivfs translators, Samuel Thibault, 2016/05/02
- [hurd] 21/31: libshouldbeinlibc: use the new assert in the refcount primitives, Samuel Thibault, 2016/05/02
- [hurd] 12/31: Fix access mode of temporary files, Samuel Thibault, 2016/05/02
- [hurd] 02/31: Fix swap information numbers, Samuel Thibault, 2016/05/02
- [hurd] 19/31: libpager: add missing include, Samuel Thibault, 2016/05/02
- [hurd] 09/31: Make make install idempotent, Samuel Thibault, 2016/05/02
- [hurd] 23/31: startup: implement bits of the fs and io protocols, Samuel Thibault, 2016/05/02
- [hurd] 11/31: libfshelp: pass cookie to the callback function, Samuel Thibault, 2016/05/02