From 39ec815ff196c55cd68cf3e4665359860db33790 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Date: Sun, 27 Jan 2008 18:38:55 +0100 Subject: [PATCH] os_errno is not used by libisofs, and thus is removed from API. --- libisofs/libisofs.h | 3 +-- libisofs/messages.c | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libisofs/libisofs.h b/libisofs/libisofs.h index 5cccf13..30e8939 100644 --- a/libisofs/libisofs.h +++ b/libisofs/libisofs.h @@ -1902,13 +1902,12 @@ int iso_set_msgs_severities(char *queue_severity, char *print_severity, * @param error_code Will become a unique error code as listed in error.h * @param imgid Id of the image that was issued the message. * @param msg_text Must provide at least ISO_MSGS_MESSAGE_LEN bytes. - * @param os_errno Will become the eventual errno related to the message * @param severity Will become the severity related to the message and * should provide at least 80 bytes. * @return 1 if a matching item was found, 0 if not, <0 for severe errors */ int iso_obtain_msgs(char *minimum_severity, int *error_code, int *imgid, - char msg_text[], int *os_errno, char severity[]); + char msg_text[], char severity[]); /** * Get the id of an IsoImage, used for message reporting. This message id, diff --git a/libisofs/messages.c b/libisofs/messages.c index 1e16400..19282aa 100644 --- a/libisofs/messages.c +++ b/libisofs/messages.c @@ -251,16 +251,16 @@ int iso_set_msgs_severities(char *queue_severity, char *print_severity, * will discard the whole queue. * * @param error_code Will become a unique error code as listed in messages.h + * @param imgid Id of the image that was issued the message. * @param msg_text Must provide at least ISO_MSGS_MESSAGE_LEN bytes. - * @param os_errno Will become the eventual errno related to the message * @param severity Will become the severity related to the message and * should provide at least 80 bytes. * @return 1 if a matching item was found, 0 if not, <0 for severe errors */ int iso_obtain_msgs(char *minimum_severity, int *error_code, int *imgid, - char msg_text[], int *os_errno, char severity[]) + char msg_text[], char severity[]) { - int ret, minimum_sevno, sevno, priority; + int ret, minimum_sevno, sevno, priority, os_errno; double timestamp; pid_t pid; char *textpt, *sev_name; @@ -273,14 +273,13 @@ int iso_obtain_msgs(char *minimum_severity, int *error_code, int *imgid, LIBISO_MSGS_PRIO_ZERO, 0); if (ret <= 0) goto ex; - ret = libiso_msgs_item_get_msg(item, error_code, &textpt, os_errno, 0); + ret = libiso_msgs_item_get_msg(item, error_code, &textpt, &os_errno, 0); if (ret <= 0) goto ex; strncpy(msg_text, textpt, ISO_MSGS_MESSAGE_LEN-1); if (strlen(textpt) >= ISO_MSGS_MESSAGE_LEN) msg_text[ISO_MSGS_MESSAGE_LEN-1] = 0; - ret = libiso_msgs_item_get_origin(item, ×tamp, &pid, imgid, 0); if (ret <= 0) goto ex;