Fixed build -- code including <vm/vm.h> must be C++.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37198 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -10,10 +10,10 @@ KernelAddon ide :
|
|||||||
channels.c
|
channels.c
|
||||||
devices.c
|
devices.c
|
||||||
dma.c
|
dma.c
|
||||||
emulation.c
|
emulation.cpp
|
||||||
ide.c
|
ide.c
|
||||||
ide_sim.c
|
ide_sim.c
|
||||||
pio.c
|
pio.cpp
|
||||||
queuing.c
|
queuing.c
|
||||||
scsi2ata.c
|
scsi2ata.c
|
||||||
sync.c
|
sync.c
|
||||||
|
|||||||
+5
-5
@@ -38,8 +38,8 @@ ide_request_sense(ide_device_info *device, ide_qrequest *qrequest)
|
|||||||
// reset sense information on read
|
// reset sense information on read
|
||||||
device->combined_sense = 0;
|
device->combined_sense = 0;
|
||||||
|
|
||||||
transferSize = min(sizeof(sense), cmd->allocation_length);
|
transferSize = min_c(sizeof(sense), cmd->allocation_length);
|
||||||
transferSize = min(transferSize, request->data_length);
|
transferSize = min_c(transferSize, request->data_length);
|
||||||
|
|
||||||
request->data_resid = request->data_length - transferSize;
|
request->data_resid = request->data_length - transferSize;
|
||||||
|
|
||||||
@@ -82,14 +82,14 @@ copy_sg_data(scsi_ccb *request, uint offset, uint allocationLength,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// remaining bytes we are allowed to copy from/to request
|
// remaining bytes we are allowed to copy from/to request
|
||||||
requestSize = min(allocationLength, request->data_length) - offset;
|
requestSize = min_c(allocationLength, request->data_length) - offset;
|
||||||
|
|
||||||
// copy one S/G entry at a time
|
// copy one S/G entry at a time
|
||||||
for (; size > 0 && requestSize > 0 && sgCount > 0; ++sgList, --sgCount) {
|
for (; size > 0 && requestSize > 0 && sgCount > 0; ++sgList, --sgCount) {
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
|
|
||||||
bytes = min(size, requestSize);
|
bytes = min_c(size, requestSize);
|
||||||
bytes = min(bytes, sgList->size);
|
bytes = min_c(bytes, sgList->size);
|
||||||
|
|
||||||
SHOW_FLOW(4, "buffer=%p, virt_addr=%p, bytes=%d, to_buffer=%d",
|
SHOW_FLOW(4, "buffer=%p, virt_addr=%p, bytes=%d, to_buffer=%d",
|
||||||
buffer, (void *)(sgList->address + offset), (int)bytes, toBuffer);
|
buffer, (void *)(sgList->address + offset), (int)bytes, toBuffer);
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
#define __IDE_INTERNAL_H__
|
#define __IDE_INTERNAL_H__
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#include <bus/IDE.h>
|
#include <bus/IDE.h>
|
||||||
#include <bus/SCSI.h>
|
#include <bus/SCSI.h>
|
||||||
#include "ide_device_infoblock.h"
|
#include "ide_device_infoblock.h"
|
||||||
@@ -289,6 +291,9 @@ device_released_bus(ide_device_info *device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
// ata.c
|
// ata.c
|
||||||
|
|
||||||
bool check_rw_error(ide_device_info *device, ide_qrequest *qrequest);
|
bool check_rw_error(ide_device_info *device, ide_qrequest *qrequest);
|
||||||
@@ -399,4 +404,7 @@ status_t ide_irq_handler(ide_bus_info *bus, uint8 status);
|
|||||||
status_t ide_timeout(timer *arg);
|
status_t ide_timeout(timer *arg);
|
||||||
|
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __IDE_INTERNAL_H__ */
|
#endif /* __IDE_INTERNAL_H__ */
|
||||||
|
|||||||
@@ -14,8 +14,11 @@
|
|||||||
#define __IDE_SIM_H__
|
#define __IDE_SIM_H__
|
||||||
|
|
||||||
|
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#include "scsi_cmds.h"
|
#include "scsi_cmds.h"
|
||||||
|
|
||||||
|
|
||||||
extern scsi_for_sim_interface *scsi;
|
extern scsi_for_sim_interface *scsi;
|
||||||
extern scsi_sim_interface ide_sim_module;
|
extern scsi_sim_interface ide_sim_module;
|
||||||
|
|
||||||
@@ -72,7 +75,11 @@ start_request(ide_device_info *device, ide_qrequest *qrequest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
void create_sense(ide_device_info *device, scsi_sense *sense);
|
void create_sense(ide_device_info *device, scsi_sense *sense);
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+4
-4
@@ -168,7 +168,7 @@ transfer_PIO_physcont(ide_device_info *device, addr_t physicalAddress,
|
|||||||
|
|
||||||
SHOW_FLOW(4, "page_left=%d", page_left);
|
SHOW_FLOW(4, "page_left=%d", page_left);
|
||||||
|
|
||||||
cur_len = min(page_left, length);
|
cur_len = min_c(page_left, length);
|
||||||
|
|
||||||
SHOW_FLOW(4, "cur_len=%d", cur_len);
|
SHOW_FLOW(4, "cur_len=%d", cur_len);
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ transfer_PIO_block(ide_device_info *device, int length, bool write, int *transfe
|
|||||||
// we might have transmitted part of a scatter/entry already!
|
// we might have transmitted part of a scatter/entry already!
|
||||||
left_bytes = device->cur_sg_elem->size - device->cur_sg_ofs;
|
left_bytes = device->cur_sg_elem->size - device->cur_sg_ofs;
|
||||||
|
|
||||||
cur_len = min(left_bytes, length);
|
cur_len = min_c(left_bytes, length);
|
||||||
|
|
||||||
err = transfer_PIO_physcont(device,
|
err = transfer_PIO_physcont(device,
|
||||||
(addr_t)device->cur_sg_elem->address + device->cur_sg_ofs,
|
(addr_t)device->cur_sg_elem->address + device->cur_sg_ofs,
|
||||||
@@ -249,7 +249,7 @@ write_discard_PIO(ide_device_info *device, int length)
|
|||||||
|
|
||||||
// if device asks for odd number of bytes, append an extra byte to
|
// if device asks for odd number of bytes, append an extra byte to
|
||||||
// make length even (this is the "length + 1" term)
|
// make length even (this is the "length + 1" term)
|
||||||
cur_len = min(length + 1, (int)(sizeof(buffer))) / 2;
|
cur_len = min_c(length + 1, (int)(sizeof(buffer))) / 2;
|
||||||
|
|
||||||
bus->controller->write_pio(bus->channel_cookie, (uint16 *)buffer, cur_len, false);
|
bus->controller->write_pio(bus->channel_cookie, (uint16 *)buffer, cur_len, false);
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ read_discard_PIO(ide_device_info *device, int length)
|
|||||||
int cur_len;
|
int cur_len;
|
||||||
|
|
||||||
// read extra byte if length is odd (that's the "length + 1")
|
// read extra byte if length is odd (that's the "length + 1")
|
||||||
cur_len = min(length + 1, (int)sizeof(buffer)) / 2;
|
cur_len = min_c(length + 1, (int)sizeof(buffer)) / 2;
|
||||||
|
|
||||||
bus->controller->read_pio(bus->channel_cookie, (uint16 *)buffer, cur_len, false);
|
bus->controller->read_pio(bus->channel_cookie, (uint16 *)buffer, cur_len, false);
|
||||||
|
|
||||||
Reference in New Issue
Block a user