Print the platform strings embedded in the binary file_name and return 0, on on error return 2.
| 42 | // Print the platform strings embedded in the binary file_name and return 0, |
| 43 | // on on error return 2. |
| 44 | static int PrintStrings(const std::string file_name) { |
| 45 | int rc = 0; |
| 46 | string_vec str; |
| 47 | if (!tensorflow::GetPlatformStrings(file_name, &str)) { |
| 48 | for (int i = 0; i != str.size(); i++) { |
| 49 | printf("%s\n", str[i].c_str()); |
| 50 | } |
| 51 | } else { |
| 52 | perror(file_name.c_str()); |
| 53 | rc = 2; |
| 54 | } |
| 55 | return rc; |
| 56 | } |
| 57 | |
| 58 | // Return whether str[] conatins a string with prefix "macro_name="; if so, |
| 59 | // set *pvalue to the suffix. |
no test coverage detected