X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fuserspace-probe.c;h=9ce212ef26f04d987da506d56de8ccb94618d571;hb=ca806b0b247f89c62ac628a7779ae84049a8c2d7;hp=e5cba5ed27e4b55a6ca05d8926e5e658d3328a53;hpb=a0377dfefe40662ba7d68617bce6ff467114136c;p=lttng-tools.git diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c index e5cba5ed2..9ce212ef2 100644 --- a/src/common/userspace-probe.c +++ b/src/common/userspace-probe.c @@ -1179,7 +1179,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_serialize( const struct lttng_userspace_probe_location *location, struct lttng_payload *payload) @@ -1381,18 +1380,21 @@ int lttng_userspace_probe_location_tracepoint_create_from_payload( probe_name = lttng_strndup(probe_name_src, LTTNG_SYMBOL_NAME_LEN); if (!probe_name) { - PERROR("lttng_strndup"); + PERROR("Failed to allocate probe name"); + ret = -LTTNG_ERR_INVALID; goto end; } provider_name = lttng_strndup(provider_name_src, LTTNG_SYMBOL_NAME_LEN); if (!provider_name) { - PERROR("lttng_strndup"); + PERROR("Failed to allocate provider name"); + ret = -LTTNG_ERR_INVALID; goto end; } - binary_path = lttng_strndup(binary_path_src, LTTNG_SYMBOL_NAME_LEN); + binary_path = lttng_strndup(binary_path_src, LTTNG_PATH_MAX); if (!binary_path) { - PERROR("lttng_strndup"); + PERROR("Failed to allocate binary path"); + ret = -LTTNG_ERR_INVALID; goto end; } @@ -1469,7 +1471,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_create_from_payload( struct lttng_payload_view *view, struct lttng_userspace_probe_location **location) @@ -1857,7 +1858,6 @@ end: return ret; } -LTTNG_HIDDEN int lttng_userspace_probe_location_flatten( const struct lttng_userspace_probe_location *location, struct lttng_dynamic_buffer *buffer) @@ -1885,7 +1885,6 @@ end: return ret; } -LTTNG_HIDDEN struct lttng_userspace_probe_location *lttng_userspace_probe_location_copy( const struct lttng_userspace_probe_location *location) { @@ -1920,7 +1919,6 @@ err: return new_location; } -LTTNG_HIDDEN bool lttng_userspace_probe_location_lookup_method_is_equal( const struct lttng_userspace_probe_location_lookup_method *a, const struct lttng_userspace_probe_location_lookup_method *b) @@ -1945,7 +1943,6 @@ end: return is_equal; } -LTTNG_HIDDEN bool lttng_userspace_probe_location_is_equal( const struct lttng_userspace_probe_location *a, const struct lttng_userspace_probe_location *b) @@ -1975,14 +1972,12 @@ end: return is_equal; } -LTTNG_HIDDEN unsigned long lttng_userspace_probe_location_hash( const struct lttng_userspace_probe_location *location) { return location->hash(location); } -LTTNG_HIDDEN enum lttng_error_code lttng_userspace_probe_location_mi_serialize( const struct lttng_userspace_probe_location *location, struct mi_writer *writer)