rpms/openhpi/devel openhpi-2.2.1-gcc4.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 openhpi.spec, 1.21, 1.22 sources, 1.5, 1.6 openhpi-2.0.3-gcc4.patch, 1.4, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Nov 11 14:37:23 UTC 2005
Author: pknirsch
Update of /cvs/dist/rpms/openhpi/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv6381
Modified Files:
.cvsignore openhpi.spec sources
Added Files:
openhpi-2.2.1-gcc4.patch
Removed Files:
openhpi-2.0.3-gcc4.patch
Log Message:
- Update to stable openhpi-2.2.1
openhpi-2.2.1-gcc4.patch:
clients/hpithres.c | 18 ++++++++++++++----
clients/hpitop.c | 2 +-
hpi_shell/commands.c | 7 ++++---
hpi_shell/inputcmd.c | 8 ++++----
openhpid2/openhpid.cpp | 15 ++++++++++++---
plugins/ipmidirect/ipmi_log.cpp | 7 ++++---
plugins/sysfs/sysfs2hpi.c | 4 ++--
7 files changed, 41 insertions(+), 20 deletions(-)
--- NEW FILE openhpi-2.2.1-gcc4.patch ---
--- openhpi-2.2.1/openhpid2/openhpid.cpp.gcc4 2005-04-14 21:52:53.000000000 +0200
+++ openhpi-2.2.1/openhpid2/openhpid.cpp 2005-11-11 15:13:27.000000000 +0100
@@ -232,7 +232,12 @@
exit(1);
}
snprintf(pid_buf, sizeof(pid_buf), "%d\n", (int)getpid());
- write(pfile, pid_buf, strlen(pid_buf));
+ if(write(pfile, pid_buf, strlen(pid_buf)) < 0) {
+ printf("Error: Can't write to PID file .\n");
+ printf(" Aborting execution.\n\n");
+ display_help();
+ exit(1);
+ }
close(pfile);
// see if we have a valid configuration file
@@ -351,11 +356,15 @@
unlink(pid_file);
pfile = open(pid_file, O_WRONLY | O_CREAT, 0640);
snprintf(pid_buf, sizeof(pid_buf), "%d\n", (int)getpid());
- write(pfile, pid_buf, strlen(pid_buf));
+ if (write(pfile, pid_buf, strlen(pid_buf)) < 0) {
+ close(pfile);
+ return false;
+ }
close(pfile);
// housekeeping
- chdir("/");
+ if (chdir("/") < 0)
+ return false;
umask(0);
for(int i = 0; i < 1024; i++) {
close(i);
--- openhpi-2.2.1/plugins/sysfs/sysfs2hpi.c.gcc4 2005-11-11 15:13:27.000000000 +0100
+++ openhpi-2.2.1/plugins/sysfs/sysfs2hpi.c 2005-11-11 15:13:27.000000000 +0100
@@ -213,7 +213,7 @@
{
struct sensor *s;
struct oh_event *e;
- unsigned char strinput[SYSFS_NAME_LEN];
+ char strinput[SYSFS_NAME_LEN];
int puid;
SaHpiSensorDataFormatT *frmt;
@@ -526,7 +526,7 @@
e->u.res_event.entry.ResourceTag.DataType = SAHPI_TL_TYPE_ASCII6;
e->u.res_event.entry.ResourceTag.Language = SAHPI_LANG_ENGLISH;
e->u.res_event.entry.ResourceTag.DataLength = strlen(r->name);
- strcpy(e->u.res_event.entry.ResourceTag.Data, r->name);
+ strcpy((char *)e->u.res_event.entry.ResourceTag.Data, r->name);
/* add resource */
if (0 != oh_add_resource(inst->rptcache, &(e->u.res_event.entry), NULL, 0)) {
--- openhpi-2.2.1/plugins/ipmidirect/ipmi_log.cpp.gcc4 2005-09-09 12:15:46.000000000 +0200
+++ openhpi-2.2.1/plugins/ipmidirect/ipmi_log.cpp 2005-11-11 15:13:27.000000000 +0100
@@ -164,15 +164,16 @@
cIpmiLog::Output( const char *str )
{
int l = strlen( str );
+ int ret;
if ( m_fd )
- fwrite( str, l, 1, m_fd );
+ ret = fwrite( str, l, 1, m_fd );
if ( m_std_out )
- fwrite( str, l, 1, stdout );
+ ret = fwrite( str, l, 1, stdout );
if ( m_std_err )
- fwrite( str, l, 1, stderr );
+ ret = fwrite( str, l, 1, stderr );
}
--- openhpi-2.2.1/hpi_shell/commands.c.gcc4 2005-09-16 09:48:56.000000000 +0200
+++ openhpi-2.2.1/hpi_shell/commands.c 2005-11-11 15:13:27.000000000 +0100
@@ -588,11 +588,11 @@
i = get_string_param("format: MM:DD:YYYY:hh:mm:ss ==> ",
buf, READ_BUF_SIZE);
if (i != 0) return(HPI_SHELL_PARM_ERROR);
- sscanf(buf, "%d:%d:%d:%d:%d:%d",
+ i = sscanf(buf, "%d:%d:%d:%d:%d:%d",
&new_tm_time.tm_mon, &new_tm_time.tm_mday,
&new_tm_time.tm_year, &new_tm_time.tm_hour,
&new_tm_time.tm_min, &new_tm_time.tm_sec);
- if ((new_tm_time.tm_mon < 1) || (new_tm_time.tm_mon > 12)) {
+ if ((i != 6) || (new_tm_time.tm_mon < 1) || (new_tm_time.tm_mon > 12)) {
printf("Month out of range: (%d)\n", new_tm_time.tm_mon);
return(HPI_SHELL_PARM_ERROR);
};
@@ -1044,7 +1044,8 @@
strcat(buf, " ");
strcat(buf, term->term);
};
- system(buf);
+ if (system(buf) < 0)
+ return(HPI_SHELL_CMD_ERROR);
return(HPI_SHELL_OK);
}
--- openhpi-2.2.1/hpi_shell/inputcmd.c.gcc4 2005-05-13 14:25:17.000000000 +0200
+++ openhpi-2.2.1/hpi_shell/inputcmd.c 2005-11-11 15:13:28.000000000 +0100
@@ -272,7 +272,7 @@
if (len < 0) len = 0;
text[len] = 0;
} else if ((c < ' ') || (c > 'z')) {
- ungetc(c, stdin);
+ res = ungetc(c, stdin);
break;
};
text[len++] = c;
@@ -470,9 +470,9 @@
print_str_by_index(input_buf, 0, ind);
break;
case CTRL_N_KEY:
- ungetc(DOWN_KEY, stdin);
- ungetc(CTRL2_KEY, stdin);
- ungetc(CTRL1_KEY, stdin);
+ res = ungetc(DOWN_KEY, stdin);
+ res = ungetc(CTRL2_KEY, stdin);
+ res = ungetc(CTRL1_KEY, stdin);
break;
case CTRL_R_KEY:
case CTRL_S_KEY:
--- openhpi-2.2.1/clients/hpithres.c.gcc4 2004-11-30 20:39:46.000000000 +0100
+++ openhpi-2.2.1/clients/hpithres.c 2005-11-11 15:13:28.000000000 +0100
@@ -358,7 +358,8 @@
char buf[READ_BUF_SIZE];
printf("%s", mes);
- fgets(buf, READ_BUF_SIZE, stdin);
+ if (fgets(buf, READ_BUF_SIZE, stdin) == NULL)
+ return 0;
return (sscanf(buf, "%d", res));
}
@@ -422,7 +423,10 @@
Rdr->is_value = 1;
};
printf("threshold type (lc, la, li, uc, ua, ui, ph, nh): ");
- fgets(buf, READ_BUF_SIZE, stdin);
+ if (fgets(buf, READ_BUF_SIZE, stdin) == NULL) {
+ printf("ERROR: Can't read line.\n");
+ return;
+ }
S = buf;
while (*S == ' ') S++;
if (strlen(S) < 2) {
@@ -445,7 +449,10 @@
};
printf("new value: ");
- fgets(buf, READ_BUF_SIZE, stdin);
+ if (fgets(buf, READ_BUF_SIZE, stdin) == NULL) {
+ printf("ERROR: Can't read line.\n");
+ return;
+ }
i = sscanf(buf, "%f", &f);
if (i == 0) {
printf("ERROR: no value\n");
@@ -482,7 +489,10 @@
printf("\n Nem threshold:\n");
ShowThres(&thres);
printf("Is it correct (yes, no)?:");
- fgets(buf, READ_BUF_SIZE, stdin);
+ if (fgets(buf, READ_BUF_SIZE, stdin) == NULL) {
+ printf("ERROR: Can't read line.\n");
+ return;
+ }
S = buf;
while (*S == ' ') S++;
if (strncmp(S, "yes", 3) != 0)
--- openhpi-2.2.1/clients/hpitop.c.gcc4 2005-11-11 15:18:39.000000000 +0100
+++ openhpi-2.2.1/clients/hpitop.c 2005-11-11 15:19:29.000000000 +0100
@@ -258,7 +258,7 @@
(strncmp((char *)bigbuf->Data, previous_system, size+1) != 0)) {
if (previous_system[0] == '{') show_trailer(previous_system);
memset (previous_system, 0, SAHPI_MAX_TEXT_BUFFER_LENGTH);
- strncpy (previous_system, bigbuf->Data, size+1);
+ strncpy (previous_system, (const char *)bigbuf->Data, size+1);
previous_system[size+2] = '\0';
printf("\n\n%s\n", previous_system);
}
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/openhpi/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore 30 Mar 2005 13:42:30 -0000 1.5
+++ .cvsignore 11 Nov 2005 14:37:11 -0000 1.6
@@ -1 +1 @@
-openhpi-2.0.3.tar.gz
+openhpi-2.2.1.tar.gz
Index: openhpi.spec
===================================================================
RCS file: /cvs/dist/rpms/openhpi/devel/openhpi.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- openhpi.spec 9 Nov 2005 13:43:32 -0000 1.21
+++ openhpi.spec 11 Nov 2005 14:37:11 -0000 1.22
@@ -1,7 +1,7 @@
Summary: openhpi Hardware Platform Interface (HPI) library and tools
Name: openhpi
-Version: 2.0.3
-Release: 5
+Version: 2.2.1
+Release: 1
License: BSD
Group: System Environment/Base
Source: http://prdownloads.sourceforge.net/openhpi/%{name}-%{version}.tar.gz
@@ -9,7 +9,7 @@
Patch1: openhpi-1.9.2-rebuild.patch
Patch2: openhpi-1.9.2-overflow.patch
Patch3: openhpi-1.9.2-werror.patch
-Patch4: openhpi-2.0.3-gcc4.patch
+Patch4: openhpi-2.2.1-gcc4.patch
BuildRoot: /var/tmp/%{name}-root
BuildRequires: sysfsutils-devel, net-snmp-devel, OpenIPMI-devel
BuildRequires: elfutils-devel, rpm-devel, libtool-ltdl-devel, bzip2-devel
@@ -79,11 +79,13 @@
%{_libdir}/*.so
%{_libdir}/*.a
%{_includedir}/openhpi
-%{_includedir}/hpi_cmd.h
%{_libdir}/pkgconfig/*
%changelog
+* Fri Nov 11 2005 Phil Knirsch <pknirsch at redhat.com> 2.2.1-1
+- Update to stable openhpi-2.2.1
+
* Wed Nov 09 2005 Phil Knirsch <pknirsch at redhat.com> 2.0.3-5
- Rebuilt to link against latest openssl lib.
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/openhpi/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources 30 Mar 2005 13:42:30 -0000 1.5
+++ sources 11 Nov 2005 14:37:11 -0000 1.6
@@ -1 +1 @@
-c2160d02241b1d2f03c91586bbb44128 openhpi-2.0.3.tar.gz
+d1c914dcc3fb482cb58299fec377f7b4 openhpi-2.2.1.tar.gz
--- openhpi-2.0.3-gcc4.patch DELETED ---
More information about the fedora-cvs-commits
mailing list