• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file image_errors.h
3  * Report errors in images
4  *
5  * @remark Copyright 2002 OProfile authors
6  * @remark Read the file COPYING
7  *
8  * @author John Levon
9  */
10 
11 #ifndef IMAGE_ERRORS_H
12 #define IMAGE_ERRORS_H
13 
14 #include <list>
15 #include <string>
16 
17 class inverted_profile;
18 class extra_images;
19 
20 /// possible reasons why we can't read a binary image
21 enum image_error {
22 	image_ok = 0,
23 	image_not_found,
24 	image_unreadable,
25 	image_format_failure,
26 	image_multiple_match
27 };
28 
29 /// output why the image passed can't be read to stderr, we warranty only one
30 /// error report by image name.
31 void
32 report_image_error(std::string const & image, image_error error, bool fatal,
33 		   extra_images const & extra);
34 
35 /// output why the image passed can't be read to stderr
36 void report_image_error(inverted_profile const & profile, bool fatal,
37 			extra_images const & extra);
38 
39 /// output why any bad images can't be read to stderr
40 void report_image_errors(std::list<inverted_profile> const & plist,
41 			 extra_images const & extra);
42 
43 #endif /* IMAGE_ERRORS_H */
44