*data_offset = wth->data_offset;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->fh);
if (bytes_read != DUMP_HDR_SIZE) {
- *err = file_error(wth->fh);
+ *err = file_error(wth->fh, err_info);
if (*err == 0 && bytes_read != 0)
*err = WTAP_ERR_SHORT_READ;
return FALSE;
buffer_assure_space(wth->frame_buffer, packet_size);
buf = buffer_start_ptr(wth->frame_buffer);
- bytes_read = file_read(buf, 1, packet_size, wth->fh);
+ bytes_read = file_read(buf, packet_size, wth->fh);
if (bytes_read != packet_size) {
- *err = file_error(wth->fh);
+ *err = file_error(wth->fh, err_info);
if (*err == 0)
*err = WTAP_ERR_SHORT_READ;
return FALSE;
static gboolean hcidump_seek_read(wtap *wth, gint64 seek_off,
union wtap_pseudo_header *pseudo_header, guint8 *pd, int length,
- int *err, gchar **err_info _U_)
+ int *err, gchar **err_info)
{
struct dump_hdr dh;
int bytes_read;
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->random_fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->random_fh);
if (bytes_read != DUMP_HDR_SIZE) {
- *err = file_error(wth->random_fh);
+ *err = file_error(wth->random_fh, err_info);
if (*err == 0 && bytes_read != 0)
*err = WTAP_ERR_SHORT_READ;
return FALSE;
}
- bytes_read = file_read(pd, 1, length, wth->random_fh);
+ bytes_read = file_read(pd, length, wth->random_fh);
if (bytes_read != length) {
- *err = file_error(wth->random_fh);
+ *err = file_error(wth->random_fh, err_info);
if (*err == 0)
*err = WTAP_ERR_SHORT_READ;
return FALSE;
return TRUE;
}
-int hcidump_open(wtap *wth, int *err, gchar **err_info _U_)
+int hcidump_open(wtap *wth, int *err, gchar **err_info)
{
struct dump_hdr dh;
guint8 type;
int bytes_read;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->fh);
if (bytes_read != DUMP_HDR_SIZE) {
- *err = file_error(wth->fh);
+ *err = file_error(wth->fh, err_info);
return (*err != 0) ? -1 : 0;
}
|| GUINT16_FROM_LE(dh.len) < 1)
return 0;
- bytes_read = file_read(&type, 1, 1, wth->fh);
+ bytes_read = file_read(&type, 1, wth->fh);
if (bytes_read != 1) {
- *err = file_error(wth->fh);
+ *err = file_error(wth->fh, err_info);
return (*err != 0) ? -1 : 0;
}
return -1;
wth->file_type = WTAP_FILE_HCIDUMP;
- wth->file_encap = WTAP_ENCAP_BLUETOOTH_H4;
+ wth->file_encap = WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR;
wth->snapshot_length = 0;
wth->subtype_read = hcidump_read;