rpms/dcbd/devel dcbd-0.9.15-lookup-string.patch, 1.1, 1.2 dcbd.spec, 1.6, 1.7
Jan Zeleny
jzeleny at fedoraproject.org
Mon Oct 5 07:28:04 UTC 2009
Author: jzeleny
Update of /cvs/extras/rpms/dcbd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3025
Modified Files:
dcbd-0.9.15-lookup-string.patch dcbd.spec
Log Message:
correction of patch fixing the new libconfig issue
dcbd-0.9.15-lookup-string.patch:
config.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
Index: dcbd-0.9.15-lookup-string.patch
===================================================================
RCS file: /cvs/extras/rpms/dcbd/devel/dcbd-0.9.15-lookup-string.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- dcbd-0.9.15-lookup-string.patch 20 Aug 2009 12:26:41 -0000 1.1
+++ dcbd-0.9.15-lookup-string.patch 5 Oct 2009 07:28:04 -0000 1.2
@@ -1,20 +1,52 @@
---- dcbd-0.9.15/config.c.orig 2009-08-20 14:07:31.000000000 +0200
-+++ dcbd-0.9.15/config.c 2009-08-20 14:12:08.000000000 +0200
-@@ -367,7 +367,7 @@ static dcb_result _set_persistent(char *
+--- dcbd-0.9.15/config.c.old 2009-10-02 15:38:53.213693022 -0700
++++ dcbd-0.9.15/config.c 2009-10-02 15:39:30.135703553 -0700
+@@ -69,6 +69,8 @@ int init_cfg(void)
+ {
+ config_setting_t *root;
+
++ config_init(&dcb_cfg);
++
+ if (!config_read_file(&dcb_cfg, cfg_file_name)) {
+ TRACE("config file failed to load\n")
+ TRACE2("error: ", config_error_text(&dcb_cfg))
+@@ -360,16 +362,15 @@ static dcb_result _set_persistent(char *
+ config_setting_t *setting_traffic = NULL;
+ config_setting_t *setting_value = NULL;
+ char abuf[2*DCB_MAX_TLV_LENGTH + 1];
+- char version[MAX_NAME_LEN];
++ char *p;
+ int result, i;
+
+ if (!init_cfg())
goto set_error;
/* Read config file version */
- strcpy(version, config_lookup_string(&dcb_cfg, "version"));
-+ config_lookup_string(&dcb_cfg, "version", &version);
- if(NULL != version) {
- result = strcmp(version, VERSION);
+- if(NULL != version) {
+- result = strcmp(version, VERSION);
++ if (config_lookup_string(&dcb_cfg, "version", (const char **)&p)) {
++ result = strcmp(p, VERSION);
if (result) {
-@@ -951,7 +951,7 @@ dcb_result get_persistent(char *device_n
+ if (result < 0) {
+ /* need to create a new upgraded cfg file */
+@@ -944,17 +945,15 @@ dcb_result get_persistent(char *device_n
+ config_setting_t *setting_value = NULL;
+ int result = dcb_failed, i;
+ int results[MAX_USER_PRIORITIES];
+- char version[MAX_NAME_LEN];
++ char *p;
+ int len;
+ char abuf[32];
+
memset(attribs, 0, sizeof(*attribs));
/* Read config file version */
- strcpy(version, config_lookup_string(&dcb_cfg, "version"));
-+ config_lookup_string(&dcb_cfg, "version", &version);
-
- if(NULL != version) {
- result = strcmp(version, VERSION);
+-
+- if(NULL != version) {
+- result = strcmp(version, VERSION);
++ if (config_lookup_string(&dcb_cfg, "version", (const char **)&p)) {
++ result = strcmp(p, VERSION);
+ if (result) {
+ if (result < 0) {
+ /* need to create a new upgraded cfg file */
Index: dcbd.spec
===================================================================
RCS file: /cvs/extras/rpms/dcbd/devel/dcbd.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- dcbd.spec 9 Sep 2009 20:11:43 -0000 1.6
+++ dcbd.spec 5 Oct 2009 07:28:04 -0000 1.7
@@ -1,6 +1,6 @@
Name: dcbd
Version: 0.9.15
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Intel EEDC Connection
Group: System Environment/Daemons
@@ -92,6 +92,10 @@ fi
%changelog
+* Mon Oct 05 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.15-5
+- replaced the last patch, which was not fully functional, with
+ the new one
+
* Wed Sep 09 2009 Karsten Hopp <karsten at redhat.com> 0.9.15-4
- buildrequire libconfig-devel >= 1.3.2, it doesn't build with 1.3.1 due to
the different config_lookup_string api
More information about the fedora-extras-commits
mailing list