Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index ece8a521..9ced6775 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -1,11 +1,11 @@
/*
* error.c
- *
+ *
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -18,21 +18,24 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "config.h"
-#include <libintl.h>
-
/* libalpm */
#include "error.h"
#include "util.h"
#include "alpm.h"
/* TODO does this really need a file all on its own? */
-char SYMEXPORT *alpm_strerror(int err)
+const char SYMEXPORT *alpm_strerrorlast(void)
+{
+ return alpm_strerror(pm_errno);
+}
+
+const char SYMEXPORT *alpm_strerror(int err)
{
switch(err) {
/* System */
@@ -44,6 +47,8 @@ char SYMEXPORT *alpm_strerror(int err)
return _("insufficient privileges");
case PM_ERR_NOT_A_FILE:
return _("could not find or read file");
+ case PM_ERR_NOT_A_DIR:
+ return _("could not find or read directory");
case PM_ERR_WRONG_ARGS:
return _("wrong or NULL argument passed");
/* Interface */
@@ -118,6 +123,11 @@ char SYMEXPORT *alpm_strerror(int err)
return _("corrupted package");
case PM_ERR_PKG_REPO_NOT_FOUND:
return _("no such repository");
+ /* Deltas */
+ case PM_ERR_DLT_CORRUPTED:
+ return _("corrupted delta");
+ case PM_ERR_DLT_PATCHFAILED:
+ return _("delta patch failed");
/* Groups */
case PM_ERR_GRP_NOT_FOUND:
return _("group not found");
@@ -135,20 +145,9 @@ char SYMEXPORT *alpm_strerror(int err)
return _("internal error");
case PM_ERR_LIBARCHIVE_ERROR:
return _("libarchive error");
- case PM_ERR_DISK_FULL:
- return _("not enough space on disk");
case PM_ERR_PKG_HOLD:
/* TODO wow this is not descriptive at all... what does this mean? */
return _("not confirmed");
- /* Configuration file */
- case PM_ERR_CONF_BAD_SECTION:
- return _("bad configuration section name");
- case PM_ERR_CONF_LOCAL:
- return _("'local' is reserved and cannot be used as a repository name");
- case PM_ERR_CONF_BAD_SYNTAX:
- return _("syntax error in config file");
- case PM_ERR_CONF_DIRECTIVE_OUTSIDE_SECTION:
- return _("all directives must belong to a section");
case PM_ERR_INVALID_REGEX:
return _("invalid regular expression");
/* Downloading */