From: Philippe E. <ph...@us...> - 2003-06-03 16:19:26
|
Update of /cvsroot/oprofile/oprofile/daemon In directory sc8-pr-cvs1:/tmp/cvs-serv11144/daemon Modified Files: opd_image.c opd_sample_files.c Log Message: error message is now a field of a samples_odb_t Index: opd_image.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/daemon/opd_image.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -p -d -r1.48 -r1.49 --- opd_image.c 29 May 2003 01:10:06 -0000 1.48 +++ opd_image.c 3 Jun 2003 16:18:50 -0000 1.49 @@ -242,7 +242,6 @@ void opd_check_image_mtime(struct opd_im void opd_put_image_sample(struct opd_image * image, vma_t offset, int counter) { - char * err_msg; samples_odb_t * sample_file; sample_file = &image->sample_files[counter]; @@ -256,9 +255,8 @@ void opd_put_image_sample(struct opd_ima } /* Possible narrowing to 32-bit value only. */ - if (odb_insert(sample_file, (unsigned long)offset, 1, &err_msg) != EXIT_SUCCESS) { - fprintf(stderr, "odb_insert() %s\n", err_msg); - free(err_msg); + if (odb_insert(sample_file, (unsigned long)offset, 1) != EXIT_SUCCESS) { + fprintf(stderr, "odb_insert() %s\n", sample_file->err_msg); exit(EXIT_FAILURE); } } Index: opd_sample_files.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/daemon/opd_sample_files.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -d -r1.13 -r1.14 --- opd_sample_files.c 29 May 2003 01:10:06 -0000 1.13 +++ opd_sample_files.c 3 Jun 2003 16:18:50 -0000 1.14 @@ -162,7 +162,6 @@ void opd_open_sample_file(struct opd_ima char * mangled; samples_odb_t * sample_file; struct opd_header * header; - char * err_msg; int rc; sample_file = &image->sample_files[counter]; @@ -171,11 +170,9 @@ void opd_open_sample_file(struct opd_ima verbprintf("Opening \"%s\"\n", mangled); - rc = odb_open(sample_file, mangled, ODB_RDWR, sizeof(struct opd_header), - &err_msg); + rc = odb_open(sample_file, mangled, ODB_RDWR, sizeof(struct opd_header)); if (rc != EXIT_SUCCESS) { - fprintf(stderr, "%s", err_msg); - free(err_msg); + fprintf(stderr, "%s", sample_file->err_msg); exit(EXIT_FAILURE); } if (!sample_file->base_memory) { |