diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-06-11 03:44:19 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-10 15:33:33 +0200 |
commit | ea3439f928a72bd942a810651565cb01e99b5293 (patch) | |
tree | bc4c62bd034ef2d7c22b783938d58aa9a2a38bf8 | |
parent | 0c62b36c19d67939d7a84159c86a5de73fd9d36f (diff) | |
download | pacman-ea3439f928a72bd942a810651565cb01e99b5293.tar.gz pacman-ea3439f928a72bd942a810651565cb01e99b5293.tar.xz |
diskspace: log errors when opening the mount table fails
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | lib/libalpm/diskspace.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 8fc4d9b0..2582c4c3 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -102,6 +102,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) fp = setmntent(MOUNTED, "r"); if(fp == NULL) { + _alpm_log(handle, ALPM_LOG_ERROR, _("could not open file: %s: %s\n"), + MOUNTED, strerror(errno)); return NULL; } @@ -123,6 +125,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) fp = fopen("/etc/mnttab", "r"); if(fp == NULL) { + _alpm_log(handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"), + "/etc/mnttab", strerror(errno)); return NULL; } @@ -148,6 +152,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) entries = getmntinfo(&fsp, MNT_NOWAIT); if(entries < 0) { + _alpm_log(handle, ALPM_LOG_ERROR, + _("could not get filesystem information\n")); return NULL; } |